javanna opened a new issue, #12230: URL: https://github.com/apache/lucene/issues/12230
### Description `TopScoreDocCollector` stops collecting hits as well as counting total hits when the provided total hits threshold is reached. Would it make sense to introduce a similar mechanism to `TotalHitCountCollector` so that you can provide a `numHitsThreshold` at initialization time and it will stop counting total hits as soon as the threshold is reached? This is consistent to the behaviour when collecting hits, in case users are not interested in accurate hit counts, and can make collection faster in that case: why keep counting if we have already counted enough hits? This is something that Elasticsearch supports today by wrapping the total hit count collector with a collector that does early termination. I thought it's simple enough and convenient to have such a mechanism built-in in Lucene, and without requiring to wrap the collector. -- 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.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