-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scroll query with a sort that is a prefix of the index sort (#27498)
During a scroll, if the search sort matches the index sort we use the sort values of the last doc returned by the previous scroll to optimize the main query with a `SearchAfterSortedDocQuery`. This query can "jump" directly to the first document that sorts after the provided sort values. This optim is also applied if the search sort is a prefix of the index sort but this case throws an exception because we use the index sort (instead of the search sort) to validate the sort values of the last document. This change fixes this bug and adds a test for it.
- Loading branch information
Showing
2 changed files
with
45 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters