vigyasharma commented on code in PR #14022: URL: https://github.com/apache/lucene/pull/14022#discussion_r1887158811
########## lucene/core/src/java/org/apache/lucene/util/hnsw/HnswUtil.java: ########## @@ -178,7 +183,10 @@ private static Component markRooted( int friendCount = 0; while ((friendOrd = hnswGraph.nextNeighbor()) != NO_MORE_DOCS) { ++friendCount; - stack.push(friendOrd); + if (connectedNodes.get(friendOrd) == false && nodesInStack.contains(friendOrd) == false) { Review Comment: We skip the nodes that have already been visited - makes sense! -- 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