Search code examples
vespa

parent-child mode: How to search document by child document field with text/string type


Seems that only attribute field can be imported.

Besides, fields of struct can only be attribute indexing mode.

So how can I implement function in vespa like the nested query (text field) in elasticsearch


Solution

  • Parent-child relationships in Vespa are implemented by indexing all parent documents on all nodes in the cluster. These are global documents.

    For performance reasons, fields imported from a parent document type must be defined as attribute, which also dictates the type of matching that is supported. Similar restrictions apply for struct fields, regardless of using parent-child relationships. See https://github.com/vespa-engine/vespa/issues/12333 for a feature request on supporting different match modes for imported fields from parent document types.