kaivalnp commented on PR #12590:
URL: https://github.com/apache/lucene/pull/12590#issuecomment-1734321355

   > you could have a collector that spans all the segments (created once at 
the query level).
   
   Interesting, so a single `KnnCollector` passed to all 
[`searchNearestVectors`](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/KnnFloatVectorQuery.java#L82)
 calls?
   
   However, `AbstractKnnVectorQuery` now [executes HNSW searches in 
parallel](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java#L104),
 and the `KnnCollector` is passed all the way to the low-level 
[`HnswGraphSearcher#searchLevel`](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphSearcher.java#L189-L202),
 so we'll need some synchronization in collecting individual docs across 
threads?
   
   I'm not sure how much overhead this will cause, but seems like a lot?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to