benwtrent opened a new pull request, #12288: URL: https://github.com/apache/lucene/pull/12288
Backport of #12160 --------------------------------------------------- ### Description Issue #11862 ### Solution `AbstractKnnVectorQuery` currently performs HNSW searches (one per-segment) iteratively Since this is done in a single thread, we can make it concurrent by spinning off per-segment searches to different threads (and make use of available processors) The actual search is performed in `Query#rewrite`, and support to allow concurrency there was added recently (#11838) by passing an `IndexSearcher` (which wraps an `IndexReader` and `Executor`) Proposing to achieve this by `CompletableFuture`: - If the `Executor` is not set, we can perform a blocking call to `CompletableFuture#completedFuture` - Else we submit the task of per-segment search to the `Executor` using `CompletableFuture#supplyAsync` -- 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