mirror of https://github.com/apache/lucene.git
LUCENE-8142: Fix QueryUtils to only call getMaxScore when it is legal to do so.
This commit is contained in:
parent
82e7cb2322
commit
67c13bbe2e
|
@ -99,7 +99,7 @@ public class AssertingScorer extends Scorer {
|
||||||
assert iterating() : state;
|
assert iterating() : state;
|
||||||
final float score = in.score();
|
final float score = in.score();
|
||||||
assert !Float.isNaN(score) : "NaN score for in="+in;
|
assert !Float.isNaN(score) : "NaN score for in="+in;
|
||||||
assert score <= getMaxScore(DocIdSetIterator.NO_MORE_DOCS);
|
assert lastShallowTarget == -1 || score <= getMaxScore(docID());
|
||||||
assert Float.compare(score, 0f) >= 0 : score;
|
assert Float.compare(score, 0f) >= 0 : score;
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue