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


##########
lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java:
##########
@@ -786,9 +830,9 @@ public void testTimeout() throws IOException {
       assertEquals(0, searcher.count(exactQuery)); // Same for exact search
 
       searcher.setTimeout(new CountingQueryTimeout(1)); // Only score 1 doc
-      // Note: This depends on the HNSW graph having just one layer,
-      // would be 0 in case of multiple layers
-      assertEquals(1, searcher.count(query)); // Expect only 1 result
+      // Note: We get partial results when the HNSW graph has 1 layer, but no 
results for > 1 layer
+      // because the timeout is exhausted while finding the best entry node 
for the last level
+      assertTrue(searcher.count(query) <= 1); // Expect at most 1 result

Review Comment:
   👍 



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