Disable sort optimization in search_after and scroll requests#78230
Disable sort optimization in search_after and scroll requests#78230dnhatn merged 6 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-search (Team:Search) |
jimczi
left a comment
There was a problem hiding this comment.
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. |
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.
@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.