mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 19:15:06 +00:00
LUCENE-9524: Fix test failure.
This commit is contained in:
parent
0746d30302
commit
0bc494e381
@ -193,7 +193,7 @@ public class TestSpanExplanations extends BaseExplanationTestCase {
|
|||||||
IndexSearcher indexSearcher = newSearcher(reader);
|
IndexSearcher indexSearcher = newSearcher(reader);
|
||||||
SpanWeight spanWeight = query.createWeight(indexSearcher, ScoreMode.COMPLETE_NO_SCORES, 1f);
|
SpanWeight spanWeight = query.createWeight(indexSearcher, ScoreMode.COMPLETE_NO_SCORES, 1f);
|
||||||
|
|
||||||
final LeafReaderContext ctx = reader.leaves().get(0);
|
final LeafReaderContext ctx = indexSearcher.getIndexReader().leaves().get(0);
|
||||||
Explanation explanation = spanWeight.explain(ctx, 0);
|
Explanation explanation = spanWeight.explain(ctx, 0);
|
||||||
|
|
||||||
assertEquals(0f, explanation.getValue());
|
assertEquals(0f, explanation.getValue());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user