You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/18 09:55:25 UTC

[GitHub] [lucene] iverase commented on a change in pull request #691: LUCENE-10424: Optimize the "everything matches" case for count query in PointRangeQuery

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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org