jpountz commented on PR #964: URL: https://github.com/apache/lucene/pull/964#issuecomment-1163172835
I guess I was implicitly raising the question of whether it's worth optimizing `TotalHitCountCollector` to leverage `Weight#count` given that `IndexSearcher#count` is already optimized to leverage `Weight#count`. One argument against this is that users sometimes create their collectors manually, and actually they have to if they want to be able to use `MultiCollector`. With this change, the query does indeed still have to visit every hit, but the query directly collects into the facets collector instead of going through a MultiLeafCollector that itself collects into both the `TotalHitCountCollector` and the `FacetsCollector`. -- 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