jainankitk commented on code in PR #14647:
URL: https://github.com/apache/lucene/pull/14647#discussion_r4570142410


##########
lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java:
##########
@@ -307,6 +354,11 @@ public DocIdSetIterator iterator(long leadCost) throws 
IOException {
               if (values.getDocCount() == reader.maxDoc()
                   && values.getDocCount() == values.size()
                   && cost() > reader.maxDoc() / 2) {
+                // Since we use (pointTree.size() + 1) / 2 to estimate count 
in cross case, whether
+                // use InverseIntersectVisitor only depends on whether 
pointTree.size() is odd
+                // number or not, e.g. odd number use InverseIntersectVisitor, 
even number use
+                // IntersectVisitor.

Review Comment:
   The comment is only true for single-leaf segments, but it's written as if it 
were always true. I guess nothing worth documenting.



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