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 03:42:21 UTC

[GitHub] [lucene] LuXugang opened a new pull request #691: LUCENE-10424: Optimize the "everything matches" case for count query in PointRangeQuery

LuXugang opened a new pull request #691:
URL: https://github.com/apache/lucene/pull/691


   In Implement of Weight#count in PointRangeQuery, Whether additional consideration is needed that when PointValues#getDocCount() == IndexReader#maxDoc() and the range's lower bound is less that the field's min value and the range's upper bound is greater than the field's max value, then return reader.maxDoc() directly?


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


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

Posted by GitBox <gi...@apache.org>.
iverase commented on pull request #691:
URL: https://github.com/apache/lucene/pull/691#issuecomment-1046508035


   Thank you @LuXugang! 


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


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

Posted by GitBox <gi...@apache.org>.
LuXugang commented on a change in pull request #691:
URL: https://github.com/apache/lucene/pull/691#discussion_r809895342



##########
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:
       Simply and much more thoughtful! 




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


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

Posted by GitBox <gi...@apache.org>.
LuXugang commented on pull request #691:
URL: https://github.com/apache/lucene/pull/691#issuecomment-1044529977


   > Could you add an entry in CHANGES.txt?
   
   
   
   > Could you add an entry in CHANGES.txt?
   
   DONE


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


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

Posted by GitBox <gi...@apache.org>.
iverase commented on pull request #691:
URL: https://github.com/apache/lucene/pull/691#issuecomment-1044480879


   Could you add an entry in CHANGES.txt? 


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


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

Posted by GitBox <gi...@apache.org>.
iverase merged pull request #691:
URL: https://github.com/apache/lucene/pull/691


   


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


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

Posted by GitBox <gi...@apache.org>.
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