jpountz commented on code in PR #12381: URL: https://github.com/apache/lucene/pull/12381#discussion_r1245348154
########## lucene/core/src/java/org/apache/lucene/index/DocsWithFieldSet.java: ########## @@ -75,4 +75,9 @@ public DocIdSetIterator iterator() { public int cardinality() { return cardinality; } + + /** Return the FixedBitSet of this set. */ + public FixedBitSet bitSet() { Review Comment: I would rather like to expose something like `boolean dense()` instead of the internal bitset. ########## lucene/core/src/java/org/apache/lucene/util/BitSet.java: ########## @@ -111,4 +111,70 @@ public void or(DocIdSetIterator iter) throws IOException { set(doc); } } + + public static final BitSet all(int maxDoc) { Review Comment: We currently only have 2 implementations of `BitSet`, which the JVM optimizes better than N implementations. Could we remove this special `BitSet` implementation and use a special `null` marker instead to imply that all docs match? -- 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