magibney commented on a change in pull request #2: URL: https://github.com/apache/solr/pull/2#discussion_r593295065
########## File path: solr/core/src/java/org/apache/solr/search/SortedIntDocSet.java ########## @@ -671,107 +679,141 @@ public DocSet union(DocSet other) { return new BitDocSet(newbits); } - @Override - public Filter getTopFilter() { - return new Filter() { + private int[] cachedOrdIdxMap; Review comment: Ah, I had thought you meant to effectively build this "`ordIdxMap`" _in_ the ctor, as opposed to provided as an explicit arg to the `SortedIntDocSet` ctor! I'll look into what it would take to do the latter. The idea of building this during collection probably changes things, but I went the "cached" route initially (knowing that it could be moved into the ctor) to avoid doing extra work in the case of DocSets that may only used at the global level, and never asked to supply any `DocIdSetIterator` (e.g., in [JoinQuery.getDocSetEnumerate()](https://github.com/apache/solr/blob/7ada4032180b516548fc0263f42da6a7a917f92b/solr/core/src/java/org/apache/solr/search/JoinQuery.java#L454-L457)). ---------------------------------------------------------------- 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