Skip to content

Commit d99c54b

Browse files
committed
Remove never used path.
1 parent ef860f0 commit d99c54b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lucene/core/src/java/org/apache/lucene/search/DenseConjunctionBulkScorer.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,20 @@ private void scoreWindowUsingLeapFrog(
304304
int min,
305305
int max)
306306
throws IOException {
307+
assert twoPhases.size() > 0;
308+
assert approximations.size() > twoPhases.size();
309+
307310
if (approximations.size() == 1) {
308-
// Since a TwoPhaseIterator comes with its approximation, the number of approximations is gte
309-
// the number of TwoPhaseIterators
310-
assert twoPhases.size() <= 1;
311+
// scoreWindowUsingLeapFrog is only used if there is at least one two-phase iterator, so our
312+
// single clause is a two-phase iterator
313+
assert twoPhases.size() == 1;
311314
DocIdSetIterator approximation = approximations.get(0);
312-
TwoPhaseIterator twoPhase = twoPhases.isEmpty() ? null : twoPhases.get(0);
315+
TwoPhaseIterator twoPhase = twoPhases.get(0);
313316
if (approximation.docID() < min) {
314317
approximation.advance(min);
315318
}
316319
for (int doc = approximation.docID(); doc < max; doc = approximation.nextDoc()) {
317-
if ((acceptDocs == null || acceptDocs.get(doc))
318-
&& (twoPhase == null || twoPhase.matches())) {
320+
if ((acceptDocs == null || acceptDocs.get(doc)) && twoPhase.matches()) {
319321
collector.collect(doc);
320322
}
321323
}

0 commit comments

Comments
 (0)