-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Bugfix for mixed version cluster queries using text expansion #105912
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
Bugfix for mixed version cluster queries using text expansion #105912
Conversation
|
Pinging @elastic/ent-search-eng (Team:Enterprise Search) |
demjened
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, I'd just like to see more verbal explanation of the two use cases and when we might fall back.
...ck/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/queries/TextExpansionQueryBuilder.java
Show resolved
Hide resolved
...ck/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/queries/TextExpansionQueryBuilder.java
Show resolved
Hide resolved
...ck/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/queries/TextExpansionQueryBuilder.java
Show resolved
Hide resolved
...ck/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/queries/TextExpansionQueryBuilder.java
Outdated
Show resolved
Hide resolved
| return weightedTokensQueryBuilder; | ||
| } | ||
| // Note: Weighted tokens queries were introduced in 8.13.0. To support cross cluster search against older versions, | ||
| // if no token pruning configuration is specified we fall back to a boolean query. |
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.
Note that mixed version cluster requires this too which is why it was done this way in the first place. We expect that the weighted token config is used only when all nodes in the cluster are >= 8.13.
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.
Thanks, edited the 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.
Thank you for adding this comment. This will help us avoid making this change in future.
|
@elasticmachine merge upstream |
This PR fixes a regression introduced in #105581 that broke cross cluster search for text expansion queries, since CCS supports versions that do not yet have the weighted tokens query.