msokolov commented on code in PR #15075: URL: https://github.com/apache/lucene/pull/15075#discussion_r2277640845
########## lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java: ########## @@ -1492,7 +1493,11 @@ public void testSearchWithVisitedLimit() throws Exception { .searchNearestVectors( fieldName, randomNormalizedVector(dimension), k, liveDocs, visitedLimit); assertEquals(TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO, results.totalHits.relation()); - assertEquals(visitedLimit, results.totalHits.value()); + int size = Lucene99HnswVectorsReader.EXHAUSTIVE_BULK_SCORE_ORDS; + assertTrue( + visitedLimit == results.totalHits.value() + || ((visitedLimit + size - 1) / size) * ((long) size) Review Comment: the second one is always looser than the first one, so we don't need both? Can we simplify to assertEquals(((visitedLimit + size - 1) / size) * ((long) size), results.totalHits.value()); -- 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