mirror of https://github.com/apache/lucene.git
LUCENE-8597: TestIntervals.assertGaps() needs to take docBase into account
This commit is contained in:
parent
53b05c5e7e
commit
dae3e304a1
|
@ -153,6 +153,7 @@ public class TestIntervals extends LuceneTestCase {
|
|||
int ord = ReaderUtil.subIndex(doc, searcher.getIndexReader().leaves());
|
||||
LeafReaderContext ctx = searcher.getIndexReader().leaves().get(ord);
|
||||
IntervalIterator it = source.intervals(field, ctx);
|
||||
doc = doc - ctx.docBase;
|
||||
assertEquals(doc, it.advance(doc));
|
||||
for (int expectedGap : expectedGaps) {
|
||||
if (it.nextInterval() == IntervalIterator.NO_MORE_INTERVALS) {
|
||||
|
|
Loading…
Reference in New Issue