You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by so...@apache.org on 2022/11/04 13:30:53 UTC

[lucene] branch main updated: #11896: reduce top k in test to avoid split-graph (#11899)

This is an automated email from the ASF dual-hosted git repository.

sokolov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 48aad5090f4 #11896: reduce top k in test to avoid split-graph (#11899)
48aad5090f4 is described below

commit 48aad5090f4c659e109108ce967abf953e64315c
Author: Michael Sokolov <so...@falutin.net>
AuthorDate: Fri Nov 4 09:30:46 2022 -0400

    #11896: reduce top k in test to avoid split-graph (#11899)
---
 .../org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java
index fa1a8e62f30..3accb315b05 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java
@@ -1087,7 +1087,7 @@ public abstract class BaseKnnVectorsFormatTestCase extends BaseIndexFileFormatTe
           // assert that searchNearestVectors returns the expected number of documents,
           // in descending score order
           int size = ctx.reader().getVectorValues(fieldName).size();
-          int k = random().nextInt(size / 2 + 1) + 1;
+          int k = random().nextInt(size / 10 + 1) + 1;
           if (k > numLiveDocsWithVectors) {
             k = numLiveDocsWithVectors;
           }