magibney commented on a change in pull request #2: URL: https://github.com/apache/solr/pull/2#discussion_r593335767
########## File path: solr/core/src/java/org/apache/solr/search/DocSet.java ########## @@ -131,6 +140,15 @@ public int andNotSize(DocSet other) { */ public abstract Bits getBits(); + /** + * A per-segment {@link Bits} instance that has fast random access (as is generally + * required of Bits). In contrast with {@link #getBits()}, only trivial work should + * be done to generate a return value (i.e., if the underlying set natively supports + * random access). This method should return <code>null</code> for sets that do not + * support random access. + */ + public abstract Bits getBits(LeafReaderContext context); Review comment: The only reason this is needed is to continue to support explicit random access from [IntervalFacets.getCountString()](https://github.com/apache/solr/blob/7ada4032180b516548fc0263f42da6a7a917f92b/solr/core/src/java/org/apache/solr/request/IntervalFacets.java#L295-L304). But as you point out [here](https://github.com/apache/solr/pull/2#discussion_r593178464), I think you're right that [it's redundant](https://github.com/apache/solr/blob/7ada4032180b516548fc0263f42da6a7a917f92b/solr/core/src/java/org/apache/solr/request/IntervalFacets.java#L406-L409), since the `bits` instance is derived from the same source as the `disi`, so `bits.get(doc)` will _never_ be `false`. Nice, this can be removed then! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org