Deepika0510 commented on code in PR #927: URL: https://github.com/apache/lucene/pull/927#discussion_r895985779
########## lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java: ########## @@ -766,18 +778,29 @@ protected void search(List<LeafReaderContext> leaves, Weight weight, Collector c } BulkScorer scorer = weight.bulkScorer(ctx); if (scorer != null) { - try { - scorer.score(leafCollector, ctx.reader().getLiveDocs()); - } catch ( - @SuppressWarnings("unused") - CollectionTerminatedException e) { - // collection was terminated prematurely - // continue with the following leaf + if (isTimeoutEnabled) { + TimeLimitingBulkScorer timeLimitingBulkScorer = + new TimeLimitingBulkScorer(scorer, queryTimeout); + try { + timeLimitingBulkScorer.score(leafCollector, ctx.reader().getLiveDocs()); + } catch ( + @SuppressWarnings("unused") + TimeLimitingBulkScorer.TimeExceededException e) { + partialResult = true; Review Comment: I have used counting QueryTimeout in the test. So, should we consider providing additional information to the user? And if yes then what all should we consider adding to it? -- 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