Skip to content

Commit fd29bf3

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 8c01df1 commit fd29bf3

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

server/src/test/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapperTests.java

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -801,10 +801,8 @@ private PruningScenario getEffectivePruningScenario(
801801
}
802802

803803
if (shouldPrune == null) {
804-
shouldPrune = indexVersion.between(
805-
SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT_BACKPORT_8_X,
806-
UPGRADE_TO_LUCENE_10_0_0
807-
) || indexVersion.onOrAfter(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT);
804+
shouldPrune = indexVersion.between(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT_BACKPORT_8_X, UPGRADE_TO_LUCENE_10_0_0)
805+
|| indexVersion.onOrAfter(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT);
808806
}
809807

810808
PruningScenario pruningScenario = PruningScenario.NO_PRUNING;
@@ -875,14 +873,8 @@ private enum VersionRange {
875873
SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT_BACKPORT_8_X,
876874
IndexVersionUtils.getPreviousVersion(UPGRADE_TO_LUCENE_10_0_0)
877875
),
878-
ES_V9X_WITHOUT_SUPPORT(
879-
UPGRADE_TO_LUCENE_10_0_0,
880-
IndexVersionUtils.getPreviousVersion(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT)
881-
),
882-
ES_V9X_WITH_SUPPORT(
883-
SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT,
884-
IndexVersion.current()
885-
);
876+
ES_V9X_WITHOUT_SUPPORT(UPGRADE_TO_LUCENE_10_0_0, IndexVersionUtils.getPreviousVersion(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT)),
877+
ES_V9X_WITH_SUPPORT(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT, IndexVersion.current());
886878

887879
private final IndexVersion fromVersion;
888880
private final IndexVersion toVersion;
@@ -894,7 +886,7 @@ private enum VersionRange {
894886

895887
IndexVersion getRandomVersion() {
896888
// TODO: replace implementation with `IndexVersionUtils::randomVersionBetween` once support is added
897-
// for handling unbalanced version distributions.
889+
// for handling unbalanced version distributions.
898890
NavigableSet<IndexVersion> allReleaseVersions = IndexVersionUtils.allReleasedVersions();
899891
Set<IndexVersion> candidateVersions = allReleaseVersions.subSet(fromVersion, toVersion);
900892
return ESTestCase.randomFrom(candidateVersions);

0 commit comments

Comments
 (0)