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

fix(query) add minimum_should_match = 1 to the "should" query #8

Merged
merged 1 commit into from
Mar 19, 2017

Conversation

jciolek
Copy link
Collaborator

@jciolek jciolek commented Mar 18, 2017

Summary

The problem appeared when the $or filter was used
alongside other filters (outside the $or group).
Expected behaviour is that at least one of the filters
in the $or group AND all the filters
outside the $or group should be met.
Elasticsearch by default returns correct results when there is only
the $or (Es: should) filter. However, when there are other filters
present, should seems to be ignored.

Setting minimum_should_match = 1 fixes the problem.

Other Information

I have added relevant test just to make sure this issues does not resurface in the future.

The problem appeared when the `$or` filter was used
alongside other filters (outside the `$or` group).
Expected behaviour is that at least one of the filters
in the `$or` group AND all the filters
outside the `$or` group should be met.
Elasticsearch by default returns correct results when there is only
the `$or` (Es: should) filter. However, when there are other filters
present, should seems to be ignored.

Setting `minimum_should_match = 1` fixes the problem.
@jciolek jciolek requested a review from daffl March 18, 2017 22:37
@daffl daffl merged commit e6e333f into feathersjs-ecosystem:master Mar 19, 2017
@daffl
Copy link
Member

daffl commented Mar 19, 2017

Released as v0.2.1

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

Successfully merging this pull request may close these issues.

2 participants