-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Split index-time and search-time sort definitions #137880
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
Split index-time and search-time sort definitions #137880
Conversation
At search time, we can now always use our custom comparators that allow pruning on secondary sorts. At index time, we need to always use Lucene SortFields, which is fine as pruning isn't used at this point in any case.
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
martijnvg
left a comment
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.
LGTM 👍
| private static final Consumer<DocIdSetIterator> checkClass = disi -> { | ||
| assertThat(disi, instanceOf(XUpdateableDocIdSetIterator.class)); | ||
| XUpdateableDocIdSetIterator iterator = (XUpdateableDocIdSetIterator) disi; | ||
| assertThat(iterator.getDelegate().getClass().getName(), containsString("SecondarySortIterator")); |
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.
nice 👍
|
Buildkite benchmark this with elastic-logs please |
💚 Build Succeeded
This build ran two elastic-logs benchmarks to evaluate performance impact of this PR. Historycc @romseygeek |
At search time, we can now always use our custom comparators that
allow pruning on secondary sorts. At index time, we need to always use
Lucene SortFields, which is fine as pruning isn't used at this point in any case.