-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add automatic tiebreaker for search requests that use a PIT #68833
Conversation
This PR adds the special `_shard_doc` sort tiebreaker automatically to any search requests that use a PIT. Adding the tiebreaker ensures that any sorted query can be paginated consistently within a PIT. Closes elastic#56828
Pinging @elastic/es-search (Team:Search) |
docs/reference/search/search-your-data/paginate-search-results.asciidoc
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/search/SearchRequest.java
Outdated
Show resolved
Hide resolved
docs/reference/search/search-your-data/paginate-search-results.asciidoc
Outdated
Show resolved
Hide resolved
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.
@jimczi Thanks Jim, exciting change!
May be we can also add a note to the issue of possible future steps that we discussed offline:
- don't add sort on _score for constant score queries
- add sort on date desc for data streams etc.
docs/reference/search/search-your-data/paginate-search-results.asciidoc
Outdated
Show resolved
Hide resolved
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.
@jimczi Thanks for the new changes, this PR lgtm with the new changes as well
This PR adds the special `_shard_doc` sort tiebreaker automatically to any search requests that use a PIT. Adding the tiebreaker ensures that any sorted query can be paginated consistently within a PIT. Closes #56828
This PR adds the special
_shard_doc
sort tiebreaker automatically to anysearch requests that use a PIT. Adding the tiebreaker ensures that any
sorted query can be paginated consistently within a PIT.
Closes #56828