iverase commented on a change in pull request #486: URL: https://github.com/apache/lucene/pull/486#discussion_r761250414
########## 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()); + pointTree.visitDocValues(visitor::compare, visitor, visitor); } break; default: throw new IllegalArgumentException("Unreachable code"); } } + private void visitDocIds(IntersectVisitor visitor, PointTree pointTree) throws IOException { + final long size = pointTree.size(); + if (size <= Integer.MAX_VALUE) { + visitor.grow((int) size); + pointTree.visitDocIDs(visitor::visit); + } else { + if (pointTree.moveToChild()) { + do { + visitDocIds(visitor, pointTree); Review comment: Not sure if that would fix that. This recursion will potentially have the same depth as the one when we visit an intersecting leaf (via #visitDocValues), so it won't be fixing issues for high depth trees? -- 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