antonha commented on code in PR #13149:
URL: https://github.com/apache/lucene/pull/13149#discussion_r1515633284


##########
lucene/core/src/java/org/apache/lucene/util/bkd/DocIdsWriter.java:
##########
@@ -318,9 +378,8 @@ private static void readLegacyDeltaVInts(IndexInput in, int 
count, IntersectVisi
 
   private void readDelta16(IndexInput in, int count, IntersectVisitor visitor) 
throws IOException {
     readDelta16(in, count, scratch);
-    for (int i = 0; i < count; i++) {
-      visitor.visit(scratch[i]);
-    }
+    scratchDocIdSetIterator.reset(count);
+    visitor.visit(scratchDocIdSetIterator);

Review Comment:
   There is a comment higher up in the file, next to the 
ScratchDocIdSetIterator. Would moving that down here and referring to this PR 
make things better?



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