Skip to content
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

Merged
merged 11 commits into from
Feb 17, 2021

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Feb 10, 2021

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 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
@jimczi jimczi added >feature :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.12.0 labels Feb 10, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Feb 10, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a 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:

  1. don't add sort on _score for constant score queries
  2. add sort on date desc for data streams etc.

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a 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

@jimczi jimczi merged commit ab7dd46 into elastic:master Feb 17, 2021
@jimczi jimczi deleted the automatic_tiebreaker_pit branch February 17, 2021 16:37
jimczi added a commit that referenced this pull request Feb 18, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.12.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Virtual Sort field for automatic tie-breaking
5 participants