iverase commented on code in PR #13886:
URL: https://github.com/apache/lucene/pull/13886#discussion_r1833247096
##########
lucene/core/src/java/org/apache/lucene/search/IndexSortSortedNumericDocValuesRangeQuery.java:
##########
@@ -397,106 +413,80 @@ private boolean matchAll(PointValues points, byte[]
queryLowerPoint, byte[] quer
}
private IteratorAndCount getDocIdSetIteratorOrNullFromBkd(
- LeafReaderContext context, DocIdSetIterator delegate) throws IOException
{
- Sort indexSort = context.reader().getMetaData().sort();
+ LeafReader reader, NumericDocValues numericDocValues, DocValuesSkipper
skipper)
+ throws IOException {
+ if (skipper.docCount() != reader.maxDoc()) {
+ return null;
+ }
+ final Sort indexSort = reader.getMetaData().sort();
if (indexSort == null
|| indexSort.getSort().length == 0
|| indexSort.getSort()[0].getField().equals(field) == false) {
return null;
}
+ final int minDocID;
+ final int maxDocID;
final boolean reverse = indexSort.getSort()[0].getReverse();
-
- PointValues points = context.reader().getPointValues(field);
Review Comment:
I think the skipper should be our first option as I believe it is the
cheaper one. The point index still needs to allocate a few things to be able to
traverse the tree. wdyt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]