msokolov commented on code in PR #13566: URL: https://github.com/apache/lucene/pull/13566#discussion_r1676077428
########## lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java: ########## @@ -408,7 +410,23 @@ private void finish() throws IOException { } private void connectComponents() throws IOException { - List<Component> components = HnswUtil.components(hnsw); + long start = System.nanoTime(); + for (int level = 0; level < hnsw.numLevels(); level++) { + if (connectComponents(level) == false) { Review Comment: I don't think we can make this an `assert` without some more major change for the reason (mentioned above) that one of the components may already be maximally connected (ie its nodes all have the max number of neighbors). -- 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