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

The documentation for MultiMatchQuery#minimumShouldMatch says it outputs percentages, but does integers #97

Open
emig opened this issue Sep 11, 2015 · 0 comments

Comments

@emig
Copy link

emig commented Sep 11, 2015

I wanted to report the following issue:

The documentation is not according with the code

It claims that MultiMatchQuery#minimumShouldMatch:

Sets a percent value controlling how many "should" clauses in the resulting Query should match.

and that the:

Parameters
minMatch An integer between 0 and 100.

but is not the case.
Once the function is called with an integer parameter, the output JSON for that field is an integer, and not the expected percentage.

{ multi_match:
   { query: 'test_query',
     fields: [ 'test_field' ],
     minimum_should_match: 4 } }

The api for [minimum-should-match in the es documentation](https://www.elastic.co/guide/en/elasticsearch/reference/1.4/query-dsl-minimum- +should-match.html) distinguishes the case for:

Type Example Description
Integer 3 Indicates a fixed value regardless of the number of optional clauses.
Percentage 75% Indicates that this percent of the total number of optional clauses are necessary. The number computed +from the percentage is rounded down and used as the minimum.

If my analysis is correct, the documentation could be updated, describing that it is accepted a String representing any of the minimum_should_match options


also reported in this fork ErwanPigneul#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant