zhaih commented on PR #12257: URL: https://github.com/apache/lucene/pull/12257#issuecomment-1536576664
Thanks @alessandrobenedetti for your idea, but sorry I am a bit against the `OffHeapHnswSearcher` as it isn't thread-safe either: in normal search we achieve it by creating a new copy of graph for each search ([source](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/lucene95/Lucene95HnswVectorsReader.java#L334)). I think what `HnswGraphSearcher` did is ok: it uses the API set that `HnswGraph` provided to do the search. And we definitely should warn users that it does not guarantee thread safety and it varies on different graph implementation: like if user put the future `ConcurrentHnswGraph` there it should be able to just work with multi-threading out of box. -- 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