sgup432 commented on code in PR #16835:
URL: https://github.com/apache/lucene/pull/16835#discussion_r4320368544


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90DocValuesProducer.java:
##########
@@ -1123,6 +1151,37 @@ public long longValue() throws IOException {
               public long longValue() throws IOException {
                 return table[(int) values.get(disi.index())];
               }
+
+              @Override
+              public void rangeIntoBitSet(
+                  int fromDoc,
+                  int toDoc,
+                  long minValue,
+                  long maxValue,
+                  FixedBitSet bitSet,
+                  int offset)
+                  throws IOException {
+                int endDoc = Math.min(toDoc, maxDoc);
+                if (fromDoc >= endDoc) {
+                  return;
+                }
+                long[] bounds = transformTableBounds(table, minValue, 
maxValue);
+                if (bounds == null || fromDoc >= endDoc) {
+                  return;
+                }
+                int currentDoc = disi.docID();
+                if (currentDoc < fromDoc) {
+                  currentDoc = disi.advance(fromDoc);
+                } else if (currentDoc < endDoc && 
disi.advanceExact(currentDoc) == false) {
+                  currentDoc = disi.nextDoc();
+                }
+                for (; currentDoc < endDoc; currentDoc = disi.nextDoc()) {

Review Comment:
   This logic can also be extended to other encoding techniques as well? Though 
we can take it as a separate PR if needed.



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

Reply via email to