diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java index a226a99bed6..ec99739b253 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java @@ -614,7 +614,7 @@ public class TestBooleanQuery extends LuceneTestCase { q.add(new TermQuery(new Term("field", "c")), Occur.FILTER); final Weight weight = searcher.createNormalizedWeight(q, random().nextBoolean()); - final Scorer scorer = weight.scorer(reader.leaves().get(0), null); + final Scorer scorer = weight.scorer(searcher.getIndexReader().leaves().get(0), null); assertTrue(scorer instanceof ConjunctionScorer); assertNotNull(scorer.asTwoPhaseIterator()); @@ -676,7 +676,7 @@ public class TestBooleanQuery extends LuceneTestCase { q.add(new TermQuery(new Term("field", "d")), Occur.SHOULD); final Weight weight = searcher.createNormalizedWeight(q, random().nextBoolean()); - final Scorer scorer = weight.scorer(reader.leaves().get(0), null); + final Scorer scorer = weight.scorer(searcher.getIndexReader().leaves().get(0), null); assertTrue(scorer instanceof BoostedScorer || scorer instanceof ExactPhraseScorer); assertNotNull(scorer.asTwoPhaseIterator());