-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(query) add minimum_should_match = 1 to the "should" query (#8)
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.
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters