Search code examples
vespa

Does Vespa support field projection for selected retrieval?


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]

Solution

  • 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}
    }