mirror of https://github.com/apache/lucene.git
Invalid skipper now preserves scorerSupplier optimization
This commit is contained in:
parent
7934a3e2e1
commit
99af41dd09
|
@ -467,12 +467,14 @@ public class IndexSortSortedNumericDocValuesRangeQuery extends Query {
|
|||
DocValuesSkipper skipper = context.reader().getDocValuesSkipper(field);
|
||||
if (skipper != null) {
|
||||
if (skipper.minValue() > upperValue || skipper.maxValue() < lowerValue) {
|
||||
return null;
|
||||
}
|
||||
if (skipper.docCount() == context.reader().maxDoc()
|
||||
&& skipper.minValue() >= lowerValue
|
||||
&& skipper.maxValue() <= upperValue) {
|
||||
return IteratorAndCount.all(skipper.docCount());
|
||||
// Instead of returning null, act as there's no skipper.
|
||||
skipper = null;
|
||||
} else {
|
||||
if (skipper.docCount() == context.reader().maxDoc()
|
||||
&& skipper.minValue() >= lowerValue
|
||||
&& skipper.maxValue() <= upperValue) {
|
||||
return IteratorAndCount.all(skipper.docCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue