-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Fix sort values coming from unrelated documents in certain multi-level sorts #31554 #31776
Conversation
Pinging @elastic/es-search-aggs |
test this please |
I don't think the build failure is related to my commit. Failing test is an x-pack one:
|
@dbevacqua Yes, that is a ml test and is completely unrelated to the change. Can you merge master into your branch and push? This should trigger a new build. |
@martijnvg done (though no new build so far...) |
test this please |
@dbevacqua Thanks! I'm going to add some more tests, so that there is more test coverage for multi level nested sorting. Right now that test coverage is poor. I think your fix is good, but having more tests should also increase confidence in this fix and whether multi level nested sorting is actual working. |
test this please |
@jpountz Would you like to take a look at this when you have time? |
I am very sorry @dbevacqua, I tried to push to your branch to update this pr like @martijnvg did but I made something wrong and the pr got closed automatically. We discussed with @martijnvg about a simplification that should also fix #31783. |
Root filter of
Nested
returned fromSortBuilder
produces no docs due to incorrectMUST
clause. By removing it and just usingToParentBlockJoinQuery
on its own the correct docs are produced.