vibrantvarun commented on code in PR #14395: URL: https://github.com/apache/lucene/pull/14395#discussion_r2040138727
########## lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java: ########## @@ -59,6 +59,13 @@ private abstract class TopFieldLeafCollector implements LeafCollector { firstComparator.disableSkipping(); } } + if (countAllDocs == null) { Review Comment: Can we a comment here on which scenario this optimization will be useful? just like how line 53 has it for the following code. -- 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