benwtrent commented on code in PR #13566:
URL: https://github.com/apache/lucene/pull/13566#discussion_r1676111453


##########
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:
   Yeah, ok, the degenerate case is indeed problematic. I think it is OK to 
make this best effort and log. 
   
   If there are still many disconnected components, the better way is for the 
number of connections to be bumped higher.



-- 
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

Reply via email to