-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Backport can_match
endpoint to 5.6 to allow 6.0 to use the optimization in mixed version
#25704
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
Conversation
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.
Found a small typo which looks like its in the master branch too but otherwise LGTM
@@ -293,8 +295,18 @@ public void writeTo(StreamOutput out) throws IOException { | |||
} | |||
} | |||
|
|||
public Builder addAggregators(AggregatorFactories factories) { | |||
throw new UnsupportedOperationException("This needs to be removed"); | |||
public boolean mustVisiteAllDocs() { |
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.
typo: mustVisiteAllDocs --> mustVisitAllDocs?
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.
ah that is also in master I will fix it there too
With cross cluster search we can potentially proxy `can_match` requests to nodes that don't have the endpoint. This might not cause any problem from a functional perspecitve but will cause ugly error messages on the target node. This commit will cause an IAE if we try to talk to an incompatible node via a proxy. Relates to elastic#25704
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 too
…#25650) In certain situations we can early terminate and just skip the entire query phase or make the lucene level rewrite very cheap if we can already tell that a query won't match any documents. For instance if there is a single `match_none` ie. due to some range rewrite in a filter or must clause of a boolean query it can just drop all it's other queries since it will never match.
…tion in mixed version 6.0 applies some optimization to query rewriting if the number of shards is large. In oder to make use of this optimization this commit adds the internal endpoint to 5.6 such that a 6.0 coordinator node can make use of the feature even in a mixed cluster or via cross cluster search. Relates to elastic#25658
d04500d
to
9050c9e
Compare
With cross cluster search we can potentially proxy `can_match` requests to nodes that don't have the endpoint. This might not cause any problem from a functional perspecitve but will cause ugly error messages on the target node. This commit will cause an IAE if we try to talk to an incompatible node via a proxy. Relates to #25704
6.0 applies some optimization to query rewriting if the number of shards
is large. In oder to make use of this optimization this commit adds the internal endpoint
to 5.6 such that a 6.0 coordinator node can make use of the feature even in a mixed cluster
or via cross cluster search.
Relates to #25658