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

Add support for disable_coord param to terms query #12756

Merged
merged 1 commit into from Aug 11, 2015
Merged

Add support for disable_coord param to terms query #12756

merged 1 commit into from Aug 11, 2015

Conversation

keety
Copy link
Contributor

@keety keety commented Aug 9, 2015

Trivial change to enable disable_coord support for TermsQuery .

Added test case to verify support for options in TermsQuery Parser.

Closes #12755

@keety keety closed this Aug 9, 2015
@keety keety reopened this Aug 9, 2015
@clintongormley clintongormley changed the title fix to support disable_coord param in terms query Add support for disable_coord param to terms query Aug 10, 2015
@jpountz
Copy link
Contributor

jpountz commented Aug 10, 2015

Actually I was recently thinking about changing this query so that we always return a TermsQuery. It would break backward compatibility, but I'm not too happy with the current state where terms, when used as a query, is essentially a shortcut for creating a bool query. I would rather make the generated query and filter have more consistent behaviours and recommend to use bool instead of terms if disable_coord and/or min_shoul_match are required?

@clintongormley
Copy link

@jpountz i agree with your comment - this should be a simple query. All the terms query buys you is a more compact syntax when looking for lots of terms. I would guess that min_should_match and coord is more useful when dealing with only a few terms, so using a bool query instead would be ok

@jpountz
Copy link
Contributor

jpountz commented Aug 11, 2015

Ohhh I understand why you opened this PR now: this used to be supported in 1.x but support for this parameter was accidentally lost in 2.x. So we have a bw compat break. Then I'm inclined to merge the change and to later think about how we could deprecate min_should_match/disable_coord.

@jpountz jpountz self-assigned this Aug 11, 2015
jpountz added a commit that referenced this pull request Aug 11, 2015
Add support for `disable_coord` param to `terms` query
@jpountz jpountz merged commit 99f4f09 into elastic:master Aug 11, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
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 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants