zhaih commented on code in PR #12235: URL: https://github.com/apache/lucene/pull/12235#discussion_r1175733535
########## lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java: ########## @@ -306,7 +308,7 @@ private void addDiverseNeighbors(int level, int node, NeighborQueue candidates) for (int i = 0; i < size; i++) { int nbr = neighbors.node[i]; NeighborArray nbrNbr = hnsw.getNeighbors(level, nbr); - nbrNbr.insertSorted(node, neighbors.score[i]); + nbrNbr.addOutOfOrder(node, neighbors.score[i]); Review Comment: Yeah this is not quite descriptive but I'm not sure whether I can come up with a better one.. Maybe `nbrsOfNbr`? `neighborArray` is not exactly right since it is actually "the neighbor array of the neighbor" LOL -- 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