We use Spring Data Elasticsearch to design our search engine. I'm just wondering how we can match parent and child objects of the same type / document? The code looks something like this:
@Document(indexName = "customer", type = "catalogue_item")
public class CatalogueItemDocument {
...
@Field(type = FieldType.Nested, includeInParent = true)
private Set<CatalogueItemDocument> children;
...
}
Is it possible? If not, how can I achieve this using the parent-child implementation proposed by Elasticsearch here .
source
share