Vespa Product Updates, January 2020: Tensor Functions, New Sizing Guides, Performance Improvement for Matched Elements in Map/Array-of-Struct, Boolean Field Query Optimization
<p><a href="https://www.linkedin.com/in/kraune/">Kristian Aune</a>, Tech Product Manager, Verizon Media</p><p><b></b></p><p>In the <a href="https://yahoodevelopers.tumblr.com/post/189746848233/vespa-product-updates-december-2019-improved">December Vespa product update</a>, we mentioned improved ONNX support, new rank feature attributeMatch().maxWeight, free lists for attribute multivalue mapping, faster updates for out-of-sync documents, and ZooKeeper 3.5.6.</p><p><b></b></p><p>This month, we’re excited to share the following updates:</p><p><b>Tensor Functions</b><br/></p><p><b></b></p><p>The tensor language has been extended with functions to allow the representation of very complex neural nets, such as <a href="https://github.com/google-research/bert">BERT</a> models, and better support for working with mapped (sparse) tensors:</p><ul><li><a href="https://docs.vespa.ai/documentation/reference/ranking-expressions.html#slice">Slice</a> makes it possible to extract values and subspaces from tensors.</li><li><a href="https://docs.vespa.ai/documentation/reference/ranking-expressions.html#literal">Literal tensors</a> make it possible to create tensors on the fly, for instance from values sliced out of other tensors or from a list of scalar attributes or functions.<br/></li><li><a href="https://docs.vespa.ai/documentation/reference/ranking-expressions.html#merge">Merge</a> produces a new tensor from two mapped tensors of the same type, where a lambda to resolve is invoked only for overlapping values. This can be used, for example, to supply default values which are overridden by an argument tensor.</li></ul><p><b>New Sizing Guides</b><br/></p><p>Vespa is used for applications with high performance or cost requirements. New sizing guides for <a href="https://docs.vespa.ai/documentation/performance/sizing-search.html">queries</a> and <a href="https://docs.vespa.ai/documentation/performance/sizing-feeding.html">writes</a> are now available to help teams use Vespa optimally.<br/></p><p><b>Performance Improvement for Matched Elements in Map/Array-of-Struct</b><br/></p><p>As maps or arrays in documents can often grow large, applications use <a href="https://docs.vespa.ai/documentation/reference/search-definitions-reference.html#matched-elements-only">matched-elements-only</a> to return only matched items. This also simplifies application code. Performance for this feature is now improved - ex: an array or map with 20.000 elements is now 5x faster.<br/></p><p><b>Boolean Field Query Optimization</b><br/></p><p><b></b></p><p>Applications with strict latency requirements, using boolean fields and concurrent feed and query load, have a latency reduction since Vespa 7.165.5 due to an added bitCount cache. For example, we realized latency improvement from 3ms to 2ms for an application with a 30k write rate. Details in <a href="https://github.com/vespa-engine/vespa/pull/11879">#11879</a>.</p><p><b></b></p><p>About Vespa: Largely developed by Yahoo engineers, <a href="https://github.com/vespa-engine/vespa">Vespa</a> is an open source big data processing and serving engine. It’s in use by many products, such as Yahoo News, Yahoo Sports, Yahoo Finance, and the Verizon Media Ad Platform. Thanks to feedback and contributions from the community, Vespa continues to grow.</p><p><b></b></p><p>We welcome your contributions and feedback (<a href="https://twitter.com/vespaengine">tweet</a> or <a href="mailto:info@vespa.ai">email</a>) about any of these new features or future improvements you’d like to request.</p>