mirror of https://github.com/apache/lucene.git
LUCENE-3510: cleanup now that we support unlimited prohibited clauses
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1183756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
710b3626c1
commit
7fe1d8effa
|
@ -366,12 +366,9 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean scoresDocsOutOfOrder() {
|
public boolean scoresDocsOutOfOrder() {
|
||||||
int numProhibited = 0;
|
|
||||||
for (BooleanClause c : clauses) {
|
for (BooleanClause c : clauses) {
|
||||||
if (c.isRequired()) {
|
if (c.isRequired()) {
|
||||||
return false; // BS2 (in-order) will be used by scorer()
|
return false; // BS2 (in-order) will be used by scorer()
|
||||||
} else if (c.isProhibited()) {
|
|
||||||
++numProhibited;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue