mirror of https://github.com/apache/lucene.git
Fix randomly failing field info format tests (#12473)
This commit is contained in:
parent
5e725964a0
commit
229dc7481e
|
@ -354,7 +354,7 @@ public abstract class BaseFieldInfoFormatTestCase extends BaseIndexFileFormatTes
|
|||
type.setDimensions(dimension, indexDimension, dimensionNumBytes);
|
||||
}
|
||||
|
||||
if (r.nextBoolean()) {
|
||||
if (r.nextBoolean() && getVectorsMaxDimensions(fieldName) > 0) {
|
||||
int dimension = 1 + r.nextInt(getVectorsMaxDimensions(fieldName));
|
||||
VectorSimilarityFunction similarityFunction =
|
||||
RandomPicks.randomFrom(r, VectorSimilarityFunction.values());
|
||||
|
|
Loading…
Reference in New Issue