1

Does Vespa support field projection for selected retrieval? (Similar to https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html in Elastic search)

Interested in:

  • select all fields except a,b
  • select fields *_name - [select all field names ending with _name]
  • exclude fields *_name - [exclude all field names ending with _name]
Snaps
  • 39
  • 3

1 Answers1

1

Vespa don't support this today but feature requests are welcome over at https://github.com/vespa-engine/vespa/issues

You can configure summary classes which is also more efficient then resolving this at query time. See https://docs.vespa.ai/en/document-summaries.html

document foo {
   field a ..
   field b ..
   field c ..
}

document-summary ab {
   field a .. { source: a}
   field b .. { source: b}
}
Jo Kristian Bergum
  • 2,984
  • 5
  • 8
  • Has this feature been added yet? Or is there any simpler way to implement this at query time? – Snaps Feb 19 '23 at 19:30
  • No, I haven't seen any GitHub feature requests for it. It's rather simple to add this functionality as the valid fields are known, so one can match the expression against the fields and re-write it to the matching fields. Then again, this could be done in a simple searcher. – Jo Kristian Bergum Feb 27 '23 at 10:35
  • Does creating document-summary occupy extra space in the memory or it just acts like a pointer to the document? – Snaps Jun 20 '23 at 06:35
  • @Snaps it's just configuration and pointers into the summary blob. – Jo Kristian Bergum Jul 17 '23 at 12:52