Jackyrie2 opened a new pull request, #12371: URL: https://github.com/apache/lucene/pull/12371
### Description Per @zhaih suggestion in #12236, this PR moves the computation of the similarity score from `initalizedFromGraph` to a later time, when the `NeighborArray` needs to be sorted and pop out the worst non-diverse node. A new abstract class `ScoringFunction` is created to hold the necessary context to compute the similarity score, and is passed into the `addOutofOrder` function. Let me know if this solution works, as it puts extra strain on memory usage. I will work on writing unit tests, but the changes in this PR pass the current unit tests in hnsw test directory. -- 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