tteofili commented on issue #14214: URL: https://github.com/apache/lucene/issues/14214#issuecomment-2642779168
this can be reproduced with either of the following tests ```java public void testSameVectorIndexedMultipleTimes() throws IOException { try (Directory d = newDirectory()) { try (IndexWriter w = new IndexWriter(d, new IndexWriterConfig())) { for (int j = 1; j <= 1_000_000; j++) { Document doc = new Document(); doc.add( getKnnVectorField( "field", randomVector(16), DOT_PRODUCT)); w.addDocument(doc); if (j % 100 == 0) { w.flush(); } } w.commit(); } } } public void testFewDistinctVectors() throws IOException { try (Directory d = newDirectory()) { try (IndexWriter w = new IndexWriter(d, new IndexWriterConfig())) { float[][] f = new float[16][]; for (int i = 0; i < 16; i++) { f[i] = new float[16]; Arrays.fill(f[i], (float) i); } for (int i =0; i < 1_000_000; i++) { Document doc = new Document(); doc.add(getKnnVectorField("field", f[random().nextInt(16)], DOT_PRODUCT)); w.addDocument(doc); } } } } ``` they take tens of minutes and thread dump shows thread stuck at `hnsw.HnswGraphBuilder.connectComponents` whereas a similar test even with random vectors takes 10x less time to finish. -- 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