Skip to content

Commit 308961f

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 93872db commit 308961f

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ protected String contentType() {
402402
private static boolean indexVersionSupportsDefaultPruningConfig(IndexVersion indexVersion) {
403403
// default pruning for 9.1.0+ or 8.19.0+ is true for this index
404404
return (indexVersion.onOrAfter(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION)
405-
|| indexVersion.between(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION_8_X, IndexVersions.UPGRADE_TO_LUCENE_10_0_0));
405+
|| indexVersion.between(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION_8_X, IndexVersions.UPGRADE_TO_LUCENE_10_0_0));
406406
}
407407

408408
private static class SparseVectorValueFetcher implements ValueFetcher {

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ public void testDefaultsWithAndWithoutIncludeDefaults() throws Exception {
272272
assertEquals(Strings.toString(withDefaults), Strings.toString(orig));
273273

274274
XContentBuilder origWithoutDefaults = JsonXContent.contentBuilder().startObject();
275-
createMapperService(fieldMapping(this::minimalMapping))
276-
.documentMapper().mapping().toXContent(origWithoutDefaults, ToXContent.EMPTY_PARAMS);
275+
createMapperService(fieldMapping(this::minimalMapping)).documentMapper()
276+
.mapping()
277+
.toXContent(origWithoutDefaults, ToXContent.EMPTY_PARAMS);
277278
origWithoutDefaults.endObject();
278279

279280
assertEquals(Strings.toString(fieldMapping(this::minimalMapping)), Strings.toString(origWithoutDefaults));
@@ -297,8 +298,9 @@ public void testDefaultsWithAndWithoutIncludeDefaultsOlderIndexVersion() throws
297298
assertEquals(Strings.toString(withDefaults), Strings.toString(orig));
298299

299300
XContentBuilder origWithoutDefaults = JsonXContent.contentBuilder().startObject();
300-
createMapperService(indexVersion, fieldMapping(this::minimalMapping))
301-
.documentMapper().mapping().toXContent(origWithoutDefaults, INCLUDE_DEFAULTS);
301+
createMapperService(indexVersion, fieldMapping(this::minimalMapping)).documentMapper()
302+
.mapping()
303+
.toXContent(origWithoutDefaults, INCLUDE_DEFAULTS);
302304
origWithoutDefaults.endObject();
303305

304306
XContentBuilder withoutDefaults = JsonXContent.contentBuilder().startObject();

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,22 @@
2121
public class SparseVectorFieldTypeTests extends FieldTypeTestCase {
2222

2323
public void testDocValuesDisabled() {
24-
IndexVersion indexVersion = IndexVersionUtils.randomVersionBetween(random(),
25-
IndexVersions.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT, IndexVersion.current());
24+
IndexVersion indexVersion = IndexVersionUtils.randomVersionBetween(
25+
random(),
26+
IndexVersions.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT,
27+
IndexVersion.current()
28+
);
2629
MappedFieldType fieldType = new SparseVectorFieldMapper.SparseVectorFieldType(indexVersion, "field", false, Collections.emptyMap());
2730
assertFalse(fieldType.hasDocValues());
2831
expectThrows(IllegalArgumentException.class, () -> fieldType.fielddataBuilder(FieldDataContext.noRuntimeFields("test")));
2932
}
3033

3134
public void testIsNotAggregatable() {
32-
IndexVersion indexVersion = IndexVersionUtils.randomVersionBetween(random(),
33-
IndexVersions.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT, IndexVersion.current());
35+
IndexVersion indexVersion = IndexVersionUtils.randomVersionBetween(
36+
random(),
37+
IndexVersions.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT,
38+
IndexVersion.current()
39+
);
3440
MappedFieldType fieldType = new SparseVectorFieldMapper.SparseVectorFieldType(indexVersion, "field", false, Collections.emptyMap());
3541
assertFalse(fieldType.isAggregatable());
3642
}

0 commit comments

Comments
 (0)