diff --git a/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java index a6d04105bf0..db6c045ca46 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java @@ -285,7 +285,7 @@ public class TestKnnVectorQuery extends LuceneTestCase { try (IndexReader reader = DirectoryReader.open(d)) { IndexSearcher searcher = newSearcher(reader); for (int i = 0; i < numIters; i++) { - int k = random().nextInt(100) + 1; + int k = random().nextInt(80) + 1; KnnVectorQuery query = new KnnVectorQuery("field", randomVector(dimension), k); int n = random().nextInt(100) + 1; TopDocs results = searcher.search(query, n);