gsmiller commented on code in PR #13886:
URL: https://github.com/apache/lucene/pull/13886#discussion_r1833153027


##########
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 agreed when actually using the doc values, but I'm curious how 
performance would compare against using the points index if present. Our 
current logic is that we will, 1) use points if available to find all hits in 
the range, falling back to 2) bsearch over doc values to determine the range. I 
figured with this change we'd want, 1) points index, 2) skipper over doc 
values, 3) bsearch over doc values. But maybe you're suggesting we should do, 
1) skipper over doc values, 2) points index, 3) bsearch over doc values?



-- 
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

Reply via email to