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



##########
File path: lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
##########
@@ -391,6 +391,14 @@ public int count(LeafReaderContext context) throws 
IOException {
             && numDims == 1
             && values.getDocCount() == values.size()) {
           // if all documents have at-most one point
+          if (values.getDocCount() == reader.maxDoc()) {
+            final byte[] fieldPackedLower = values.getMinPackedValue();

Review comment:
       Is this check really needed? I guess this will work:
   
   ```
   if (relate(values.getMinPackedValue, values.getMaxPackedValue()) == 
Relation.CELL_WITHIN) {
     return values.getDocCount()
   }
   ```




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