-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inner_hits in should clauses override each other #37584
Comments
Pinging @elastic/es-search |
|
Hey @jimczi, @imotov looking to take a crack at this :) would looking at https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/index/query/InnerHitBuilder.java and https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/index/query/InnerHitContextBuilder.java be a good start? |
This is the function that populates the inner_hits map at each level. All these functions should throw an illegal argument exception if the map already contains an entry with the same name. |
Perfect thanks @jimczi :) |
This change throws an error if two inner_hits have the same name Closes #37584
This change throws an error if two inner_hits have the same name Closes elastic#37584
This issues is somewhat similar to #16218, but it manifests itself if two
should
clauses containhas_child
withinner_hits
and different queries and only one of the query in the last clause doesn't matches the document returned by the first clause.This is a repro for 6.x
Repro for 7.x can be found here
Originally reported in https://discuss.elastic.co/t/inner-hits-has-child/164627/10
The text was updated successfully, but these errors were encountered: