Skip to content

Commit

Permalink
Query DSL: Bool filter does not take should clauses properly into acc…
Browse files Browse the repository at this point in the history
…ount, closes elastic#1511.
  • Loading branch information
kimchy committed Nov 29, 2011
1 parent e5816d9 commit ba1b77f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
}
}

// if no should clauses match, return null (act as min_should_match set to 1)
if (res == null) {
return null;
}

if (notFilters != null) {
for (int i = 0; i < notFilters.size(); i++) {
if (res == null) {
Expand Down

0 comments on commit ba1b77f

Please sign in to comment.