Query DSL: Bool filter does not take should clauses properly into account, closes #1511.
This commit is contained in:
parent
de49a313c5
commit
e9d2f44d49
|
@ -89,10 +89,6 @@ public class XBooleanFilter extends Filter {
|
|||
|
||||
if (notFilters != null) {
|
||||
for (int i = 0; i < notFilters.size(); i++) {
|
||||
if (res == null) {
|
||||
res = new FixedBitSet(reader.maxDoc());
|
||||
res.set(0, reader.maxDoc()); // NOTE: may set bits on deleted docs
|
||||
}
|
||||
final DocIdSet disi = getDISI(notFilters, i, reader);
|
||||
if (disi != null) {
|
||||
DocSets.andNot(res, disi);
|
||||
|
@ -106,12 +102,7 @@ public class XBooleanFilter extends Filter {
|
|||
if (disi == null) {
|
||||
return null;
|
||||
}
|
||||
if (res == null) {
|
||||
res = new FixedBitSet(reader.maxDoc());
|
||||
DocSets.or(res, disi);
|
||||
} else {
|
||||
DocSets.and(res, disi);
|
||||
}
|
||||
DocSets.and(res, disi);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue