Fix failure in TestIndexSortSortedNumericDocValuesRangeQuery.testCountBoundary (#12098)

This commit is contained in:
Vigya Sharma 2023-01-19 16:16:42 -08:00 committed by GitHub
parent fa5dcbad9f
commit 519adcc954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -596,9 +596,11 @@ public class TestIndexSortSortedNumericDocValuesRangeQuery extends LuceneTestCas
new IndexSortSortedNumericDocValuesRangeQuery(
"field", lowerValue, upperValue, fallbackQuery);
Weight weight = query.createWeight(searcher, ScoreMode.COMPLETE, 1.0f);
int count = 0;
for (LeafReaderContext context : searcher.getLeafContexts()) {
assertEquals(2, weight.count(context));
count += weight.count(context);
}
assertEquals(2, count);
writer.close();
reader.close();