Same bound with fallbackQuery (#12084)

IndexSortSortedNumericDocValuesRangeQuery should have the same bound with fallbackQuery.
This commit is contained in:
Lu Xugang 2023-01-19 14:33:58 +08:00 committed by GitHub
parent dc33ade76d
commit a9fd21b6af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -250,6 +250,8 @@ Bug Fixes
* GITHUB#12088: WeightedSpanTermExtractor should not throw UnsupportedOperationException
when it encounters a FieldExistsQuery. (Alan Woodward)
* GITHUB#12084: Same bound with fallbackQuery. (Lu Xugang)
Optimizations
---------------------
* GITHUB#11738: Optimize MultiTermQueryConstantScoreWrapper when a term is present that matches all

View File

@ -682,7 +682,7 @@ public class TestIndexSortSortedNumericDocValuesRangeQuery extends LuceneTestCas
// Min bound doesn't exist in the dataset, max does
fallbackQuery = LongPoint.newRangeQuery(filedName, 6, 9);
query = new IndexSortSortedNumericDocValuesRangeQuery(filedName, 7, 10, fallbackQuery);
query = new IndexSortSortedNumericDocValuesRangeQuery(filedName, 6, 9, fallbackQuery);
weight = query.createWeight(searcher, ScoreMode.COMPLETE, 1.0f);
for (LeafReaderContext context : searcher.getLeafContexts()) {
assertEquals(1400, weight.count(context));
@ -690,7 +690,7 @@ public class TestIndexSortSortedNumericDocValuesRangeQuery extends LuceneTestCas
// Min bound is the min value of the dataset
fallbackQuery = LongPoint.newRangeQuery(filedName, 5, 8);
query = new IndexSortSortedNumericDocValuesRangeQuery(filedName, 4, 8, fallbackQuery);
query = new IndexSortSortedNumericDocValuesRangeQuery(filedName, 5, 8, fallbackQuery);
weight = query.createWeight(searcher, ScoreMode.COMPLETE, 1.0f);
for (LeafReaderContext context : searcher.getLeafContexts()) {
assertEquals(1100, weight.count(context));