kaivalnp commented on code in PR #13285: URL: https://github.com/apache/lucene/pull/13285#discussion_r1599150976
########## lucene/core/src/java/org/apache/lucene/search/AbstractVectorSimilarityQuery.java: ########## @@ -105,13 +116,16 @@ public Scorer scorer(LeafReaderContext context) throws IOException { LeafReader leafReader = context.reader(); Bits liveDocs = leafReader.getLiveDocs(); + QueryTimeout queryTimeout = searcher.getTimeout(); Review Comment: > will `queryTimeout` be null? Yes, this is `null` when a timeout isn't set In this case, the `TimeLimitingKnnCollectorManager` [returns an unwrapped `KnnCollector`](https://github.com/apache/lucene/blob/fc12cc1847e37e588535391a0feed7b6adb75461/lucene/core/src/java/org/apache/lucene/search/TimeLimitingKnnCollectorManager.java#L42-L43) which does not add overhead of time checking (even `null` checks) during graph search (also visible in [benchmarks](https://github.com/apache/lucene/pull/13202#issuecomment-2016087745)) -- 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