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/08/16 14:24:42 UTC

[GitHub] [lucene] LuXugang commented on a diff in pull request #1062: Optimize TermInSetQuery for terms that match all docs in a segment

LuXugang commented on code in PR #1062:
URL: https://github.com/apache/lucene/pull/1062#discussion_r946845549


##########
lucene/core/src/java/org/apache/lucene/search/TermInSetQuery.java:
##########
@@ -363,6 +370,29 @@ public boolean isCacheable(LeafReaderContext ctx) {
         // sets.
         return ramBytesUsed() <= RamUsageEstimator.QUERY_DEFAULT_RAM_BYTES_USED;
       }
+
+      static final class MatchAllDocIdSet extends DocIdSet {
+        private final int size;

Review Comment:
   Hi @gsmiller , I saw there was already an `EMPTY` implementation in class `DocIdSet `, and this implementation is commonly useful, should we move this implementation to  class `DocIdSet `  and name it like `all` or the other name ?



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