MarcusSorealheis commented on code in PR #12235: URL: https://github.com/apache/lucene/pull/12235#discussion_r1178774555
########## 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: As a principal, that totally makes sense. For this specific project, it makes even more sense because it's pretty complicated in some areas. The other two files are codec files with identical logic in this section, so it probably would not pose much of a problem. Although, I'm sure others could weigh in or -1 if adamant about `nbrNbr`. Most of the time, I favor readability over anything else. That could be because I am lazy. 😛 `nbrsOfNbr` is really clear while also being few characters to type. Still, no pressure. -- 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