jpountz commented on code in PR #12380: URL: https://github.com/apache/lucene/pull/12380#discussion_r1244699937
########## lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java: ########## @@ -749,6 +749,9 @@ protected void search(List<LeafReaderContext> leaves, Weight weight, Collector c partialResult = true; } } + // Note: this is called if collection ran successfully, including the above special cases of + // CollectionTerminatedException and TimeExceededException, but no other exception. + leafCollector.finish(); Review Comment: I can't think of a use-case either. Another argument could be that CollectionTerminatedException is only one way to skip hits, `LeafCollector#competitiveIterator` and `Scorer#setMinCompetitiveScore` are other ones, why would we give more information to finish() for one way of skipping and not for other ones? ########## lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java: ########## @@ -706,6 +711,14 @@ private void doUnionScoring(Bits acceptDocs, LeafCollector collector, DocsAndCos nextChunkStart += CHUNK; } + + collector.finish(); Review Comment: Good call, will change. -- 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