jpountz commented on issue #12358: URL: https://github.com/apache/lucene/issues/12358#issuecomment-1596907955
I was wondering about a possible alternative approach that would consist of handling this optimization more at the collector level. E.g. we could add a new method to LeafCollector to take a set of doc IDs (pseudo code): ``` void collect(DocIdSet set) { // default implementation for (int docID : set) { collect(docID); } } ``` Then `BooleanScorer` could pass a `DocIdSet` to the collector for each window, and TotalHitCountCollector could override the above method to do more something like this: ``` void collect(DocIdSet set) { // total hit count implementation count += set.size(); // internally uses Long#bitCount rather than iterating bits one by one } ``` -- 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