gsmiller commented on code in PR #13886: URL: https://github.com/apache/lucene/pull/13886#discussion_r1840714602
########## 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: @iverase hmm, I thought I'd responded a few days back but looks like it didn't save for some reason (probably user error). Anyway, I think your take on this is very reasonable but it would be nice to measure if possible to quantify this in some way. But yeah, I'm fine with either order as a starting point. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org