LUCENE-8597: TestIntervals.assertGaps() needs to take docBase into account

This commit is contained in:
Alan Woodward 2018-12-16 11:26:40 +00:00
parent 53b05c5e7e
commit dae3e304a1
1 changed files with 1 additions and 0 deletions

View File

@ -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) {