Allow efficient can_match phases on frozen indices#35431
Merged
s1monw merged 6 commits intoelastic:masterfrom Nov 13, 2018
Merged
Allow efficient can_match phases on frozen indices#35431s1monw merged 6 commits intoelastic:masterfrom
s1monw merged 6 commits intoelastic:masterfrom
Conversation
This change adds a special caching reader that caches all relevant values for a range query to rewrite correctly in a can_match phase without actually opening the underlying directory reader. This allows frozen indices to be filtered with can_match and in-turn searched with wildcards in a efficient way since it allows us to exclude shards that won't match based on their date-ranges without opening their directory readers. Relates to elastic#34352 Depends on elastic#34357
Collaborator
|
Pinging @elastic/es-search-aggs |
jimczi
reviewed
Nov 12, 2018
.../plugin/core/src/main/java/org/elasticsearch/index/engine/RewriteCachingDirectoryReader.java
Outdated
Show resolved
Hide resolved
.../plugin/core/src/main/java/org/elasticsearch/index/engine/RewriteCachingDirectoryReader.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@jimczi I pushed changes |
jpountz
approved these changes
Nov 13, 2018
Contributor
jpountz
left a comment
There was a problem hiding this comment.
Nice way of making can_match work on frozen indices. I left a minor question.
.../plugin/core/src/main/java/org/elasticsearch/index/engine/RewriteCachingDirectoryReader.java
Outdated
Show resolved
Hide resolved
.../plugin/core/src/main/java/org/elasticsearch/index/engine/RewriteCachingDirectoryReader.java
Outdated
Show resolved
Hide resolved
s1monw
added a commit
that referenced
this pull request
Nov 13, 2018
This change adds a special caching reader that caches all relevant values for a range query to rewrite correctly in a can_match phase without actually opening the underlying directory reader. This allows frozen indices to be filtered with can_match and in-turn searched with wildcards in a efficient way since it allows us to exclude shards that won't match based on their date-ranges without opening their directory readers. Relates to #34352 Depends on #34357
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change adds a special caching reader that caches all relevant
values for a range query to rewrite correctly in a can_match phase
without actually opening the underlying directory reader. This
allows frozen indices to be filtered with can_match and in-turn
searched with wildcards in a efficient way since it allows us to
exclude shards that won't match based on their date-ranges without
opening their directory readers.
Relates to #34352
Depends on #34357