-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Disable sort optimization in search_after and scroll requests #78230
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
Conversation
|
Pinging @elastic/es-search (Team:Search) |
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we disable for all request with search_after and not only scroll ones ?
|
@jimczi I think search_after should be okay, but it's safer to disable them all now. |
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @dnhatn
server/src/main/java/org/elasticsearch/search/query/QueryPhase.java
Outdated
Show resolved
Hide resolved
|
Elasticsearch The Lucene bug was for cases:
For a general elasticsearch with
|
|
@mayya-sharipova I agree with your analysis. @jimczi Do you still prefer to disable the sort optimization in search_after requests? |
Not necessarily, It's not really an issue anyway since we don't intend to release any version with this regression. |
I think sort optimization is only applied for long fields, and is not applicable if there is a single sort on But I am also ok to disable sort optimization with search_after completely for now to be completely sure we don't access it wrongly somewhere else internally (_seq?) |
mayya-sharipova
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnhatn Thanks a lot.
|
@jimczi @mayya-sharipova Thanks for reviews. |
…c#78230) We can't enable the sort optimization with points in scroll requests until LUCENE-10119 is integrated.
#78285) We can't enable the sort optimization with points in scroll requests until LUCENE-10119 is integrated.
Upgrade to a new Lucene 9 snapshot that includes LUCENE-10119 so we can re-enable the sort optimization with points for scroll and search_after requests. Relates #78230
We can't enable the sort optimization with points in scroll requests until LUCENE-10119 is integrated.
I labelled this PR non-issue for an unreleased bug.