mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 04:58:50 +00:00
If match then go to next doc
This commit is contained in:
parent
a89dde8bac
commit
2e93329e23
@ -241,17 +241,14 @@ public class XBooleanFilter extends Filter implements Iterable<FilterClause> {
|
||||
// should filter. TODO: Add an option to have disable minimum_should_match=1 behaviour
|
||||
if (!orClauses.isEmpty()) {
|
||||
DocIdSetIterator it = res.iterator();
|
||||
for (int setDoc = it.nextDoc(); setDoc != DocIdSetIterator.NO_MORE_DOCS; setDoc = it.nextDoc()) {
|
||||
boolean match = false;
|
||||
res: for (int setDoc = it.nextDoc(); setDoc != DocIdSetIterator.NO_MORE_DOCS; setDoc = it.nextDoc()) {
|
||||
for (ResultClause orClause : orClauses) {
|
||||
if (orClause.bits.get(setDoc)) {
|
||||
match = true;
|
||||
hasNonEmptyShouldClause = true;
|
||||
continue res;
|
||||
}
|
||||
}
|
||||
if (!match) {
|
||||
res.clear(setDoc);
|
||||
}
|
||||
res.clear(setDoc);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user