-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Sort field tiebreaker for PIT (point in time) readers #66093
Merged
Merged
Commits on Dec 9, 2020
-
Sort field tiebreaker for PIT (point in time) readers
This commit introduces a new sort field called `_shard_doc` that can be used in conjunction with a PIT to consistently tiebreak identical sort values. The sort value is a numeric long that is composed of the ordinal of the shard (assigned by the coordinating node) and the internal Lucene document ID. These two values are consistent within a PIT so this sort criteria can be used as the tiebreaker of any search requests. Since this sort criteria is stable we'd like to add it automatically to any sorted search requests that use a PIT but we also need to expose it explicitly in order to be able to: * Reverse the order of the tiebreaking, useful to search "before" `search_after`. * Force the primary sort to use it in order to benefit from the `search_after` optimization when sorting by index order (to be released in Lucene 8.8. I plan to add the documentation and the automatic configuration for PIT in a follow up since this change is already big. Relates elastic#56828
Configuration menu - View commit details
-
Copy full SHA for b34df54 - Browse repository at this point
Copy the full SHA b34df54View commit details -
Configuration menu - View commit details
-
Copy full SHA for e58ab36 - Browse repository at this point
Copy the full SHA e58ab36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a45655 - Browse repository at this point
Copy the full SHA 3a45655View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53153aa - Browse repository at this point
Copy the full SHA 53153aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd55bdb - Browse repository at this point
Copy the full SHA fd55bdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 813ae37 - Browse repository at this point
Copy the full SHA 813ae37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d8f0c9 - Browse repository at this point
Copy the full SHA 5d8f0c9View commit details
Commits on Dec 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5af84f5 - Browse repository at this point
Copy the full SHA 5af84f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f632d0a - Browse repository at this point
Copy the full SHA f632d0aView commit details
Commits on Dec 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 509df9f - Browse repository at this point
Copy the full SHA 509df9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9de14e9 - Browse repository at this point
Copy the full SHA 9de14e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7a279c - Browse repository at this point
Copy the full SHA c7a279cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.