Skip to content
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

ExtendedCommonTermsQuery does not work with GraphQuery #23102

Closed
jpountz opened this issue Feb 10, 2017 · 0 comments
Closed

ExtendedCommonTermsQuery does not work with GraphQuery #23102

jpountz opened this issue Feb 10, 2017 · 0 comments
Assignees
Labels
>bug :Search/Search Search-related issues that do not fall into other categories

Comments

@jpountz
Copy link
Contributor

jpountz commented Feb 10, 2017

This query expects boolean queries composed of term queries. However with recent changes, it became likely to have GraphQuery objects in the query when synonyms are enabled. This causes MatchQuery.boolToExtendedCommonTermsQuery to ignore the frequency cutoff entirely.

@jpountz jpountz added :Search/Search Search-related issues that do not fall into other categories >bug discuss labels Feb 10, 2017
@jimczi jimczi self-assigned this Feb 10, 2017
jimczi added a commit that referenced this issue Feb 10, 2017
GraphQueries are now generated as simple clauses in BooleanQuery. So for instance a multi terms synonym will generate
 a GraphQuery but only for the side paths, the other part of the query will not be impacted. This means that we cannot apply
 `minimum_should_match` or `cutoff_frequency` on GraphQuery anymore (only ES 5.3 does that because we generate all possible paths if a query has at least one multi terms synonym).
Starting in 5.4 multi terms synonym will now be treated as a single term when `minimum_should_match` is computed and will be ignored when `cutoff_frequency` is set.
Fixes #23102
jimczi added a commit that referenced this issue Feb 10, 2017
GraphQueries are now generated as simple clauses in BooleanQuery. So for instance a multi terms synonym will generate
 a GraphQuery but only for the side paths, the other part of the query will not be impacted. This means that we cannot apply
 `minimum_should_match` or `cutoff_frequency` on GraphQuery anymore (only ES 5.3 does that because we generate all possible paths if a query has at least one multi terms synonym).
Starting in 5.4 multi terms synonym will now be treated as a single term when `minimum_should_match` is computed and will be ignored when `cutoff_frequency` is set.
Fixes #23102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

3 participants