#11896: reduce top k in test to avoid split-graph (#11899)

This commit is contained in:
Michael Sokolov 2022-11-04 09:30:46 -04:00 committed by GitHub
parent 1a5ad61b9d
commit 48aad5090f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}