LUCENE-9524: Fix test failure.

This commit is contained in:
Adrien Grand 2020-10-19 19:17:58 +02:00
parent 0746d30302
commit 0bc494e381
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ public class TestSpanExplanations extends BaseExplanationTestCase {
IndexSearcher indexSearcher = newSearcher(reader);
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);
assertEquals(0f, explanation.getValue());