romseygeek commented on a change in pull request #486:
URL: https://github.com/apache/lucene/pull/486#discussion_r761874923



##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java
##########
@@ -495,57 +495,63 @@ private int balanceTreeNodePosition(
     }
 
     @Override
-    public void visitDocIDs(PointValues.IntersectVisitor visitor) throws 
IOException {
+    public void visitDocIDs(DocIdsVisitor docIDVisitor) throws IOException {
       resetNodeDataPosition();
-      addAll(visitor, false);
+      addAll(docIDVisitor);
     }
 
-    public void addAll(PointValues.IntersectVisitor visitor, boolean grown) 
throws IOException {
-      if (grown == false) {
-        final long size = size();
-        if (size <= Integer.MAX_VALUE) {
-          visitor.grow((int) size);
-          grown = true;
-        }
-      }
+    public void addAll(DocIdsVisitor docIdsVisitor) throws IOException {
       if (isLeafNode()) {
         // Leaf node
         leafNodes.seek(getLeafBlockFP());
         // How many points are stored in this leaf cell:
         int count = leafNodes.readVInt();
-        // No need to call grow(), it has been called up-front
-        DocIdsWriter.readInts(leafNodes, count, visitor);
+        // No need to call grow(), it has been called docIdVisitor-front

Review comment:
       ```suggestion
           // No need to call grow(), it has been called by docIdVisitor
   ```

##########
File path: lucene/core/src/java/org/apache/lucene/index/PointValues.java
##########
@@ -297,42 +339,48 @@ default void visit(DocIdSetIterator iterator) throws 
IOException {
         visit(docID);
       }
     }
+  }
 
-    /**
-     * Called for all documents in a leaf cell that crosses the query. The 
consumer should
-     * scrutinize the packedValue to decide whether to accept it. In the 1D 
case, values are visited
-     * in increasing order, and in the case of ties, in increasing docID order.
-     */
+  /**
+   * Collects all documents and values below a tree node by calling {@link
+   * PointTree#visitDocValues(DocValuesVisitor)} (DocIdsVisitor)}

Review comment:
       ```suggestion
      * PointTree#visitDocValues(DocValuesVisitor)}
   ```




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