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



##########
File path: lucene/core/src/java/org/apache/lucene/index/PointValues.java
##########
@@ -361,14 +405,29 @@ private void intersect(IntersectVisitor visitor, 
PointTree pointTree) throws IOE
           // TODO: we can assert that the first value here in fact matches 
what the pointTree
           // claimed?
           // Leaf node; scan and filter all points in this block:
-          pointTree.visitDocValues(visitor);
+          visitor.grow((int) pointTree.size());

Review comment:
       Thanks for the explanation, I see that we currently start adding any new 
docID (duplicated or not) into a int[] until a threshold were we  upgrade to a 
BitSet. 
   
   I wonder why grow does not take a long but an int if we can call `visit(int 
docID)` more than `Integer.MAX_VALUE` times?. Ii is just weird the dance we do 
here to handle big values when in our implementation for such big values we 
would have probably already upgraded to a BitSet.




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