mikemccand commented on a change in pull request #562: Don't create a LeafCollector when the Scorer for the leaf is null URL: https://github.com/apache/lucene-solr/pull/562#discussion_r253665853
########## File path: lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java ########## @@ -638,21 +638,16 @@ protected void search(List<LeafReaderContext> leaves, Weight weight, Collector c // threaded...? the Collector could be sync'd? // always use single thread: for (LeafReaderContext ctx : leaves) { // search each subreader - final LeafCollector leafCollector; - try { - leafCollector = collector.getLeafCollector(ctx); - } catch (CollectionTerminatedException e) { - // there is no doc of interest in this reader context - // continue with the following leaf - continue; - } BulkScorer scorer = weight.bulkScorer(ctx); Review comment: Should we also update javadocs for `Collector.getLeafCollector` that it will (may?) not be called when query can determine there will be no hits in this segment? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org