Skip to content

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