Details
Assignee
UnassignedUnassignedReporter
Yoann RodièreYoann RodièreComponents
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Yoann Rodière
Yoann RodièreComponents
Priority
Created July 11, 2022 at 7:16 AM
Updated September 25, 2023 at 2:48 PM
Elasticsearch provides a way to return “inner hits” in search queries:
Essentially, that means, for any
nested
predicate, we’ll assign a name to that predicate, and theSearchResult
will contain a separate result set with that name, whose hits are objects matched by the correspondingnested
predicate.See the Elasticsearch documentation for more details.
There are two main challenges:
How to represent the inner hits? Most likely, we’ll need either to load entities corresponding to the nested objects, or a way for developers to define a projection on the nested objects.
How to implement this efficiently with the Lucene backend? Let’s not look at the Elasticsearch 7.11+ implementation, the license doesn’t allow us to take inspiration from their code. We can look at Elasticsearch 7.10 and below as well as OpenSearch, though.