I have a document (document type A) which has multiple (any number of) children documents of the same type (document type B). The following link from vespa documentation talks about the parent-child relationship.
http://docs.vespa.ai/documentation/search-definitions.html#document-references
For this, we have to define a reference type field and then import any field from the referred document. What if I want multiple document references from the parent document. Can't I define something like,
field child_ref type array<reference<doc_type_child>> {
indexing: attribute
}
certainly, I would have the difficulty of importing a certain field as all the child references have the same field.
Let's say the child document type is model and parent document type is car, basically, I want to have a nested document in which I need the capability of querying based on parent and child fields also. Let's say if I search for Mercedes cars with spokes of wheels in range (3,5), the search for Mercedes brand (parent doc field) in parent documents and further I would like to choose models of Mercedes car results (car1, car2, ...) which have wheel spokes (child doc field) from 3 to 5, (car1[model 1, model 4, model 6], car2[model 2, model 3, model 5]). Basically, hits should be of Mercedes brand and in all those hits, internally hits of models which have 3-5 wheel spokes.