diff --git a/lucene/src/java/org/apache/lucene/search/BooleanQuery.java b/lucene/src/java/org/apache/lucene/search/BooleanQuery.java index d9dce63536a..aa780902a58 100644 --- a/lucene/src/java/org/apache/lucene/search/BooleanQuery.java +++ b/lucene/src/java/org/apache/lucene/search/BooleanQuery.java @@ -366,12 +366,9 @@ public class BooleanQuery extends Query implements Iterable { @Override public boolean scoresDocsOutOfOrder() { - int numProhibited = 0; for (BooleanClause c : clauses) { if (c.isRequired()) { return false; // BS2 (in-order) will be used by scorer() - } else if (c.isProhibited()) { - ++numProhibited; } }