Skip to content

Commit 03e1b42

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent a1f177b commit 03e1b42

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ public class SemanticTextFieldMapper extends FieldMapper implements InferenceFie
143143
public static final NodeFeature SEMANTIC_TEXT_INDEX_OPTIONS_WITH_DEFAULTS = new NodeFeature(
144144
"semantic_text.index_options_with_defaults"
145145
);
146-
public static final NodeFeature SEMANTIC_TEXT_SPARSE_VECTOR_INDEX_OPTIONS =
147-
new NodeFeature("semantic_text.sparse_vector_index_options");
146+
public static final NodeFeature SEMANTIC_TEXT_SPARSE_VECTOR_INDEX_OPTIONS = new NodeFeature(
147+
"semantic_text.sparse_vector_index_options"
148+
);
148149

149150
public static final String CONTENT_TYPE = "semantic_text";
150151
public static final String DEFAULT_ELSER_2_INFERENCE_ID = DEFAULT_ELSER_ID;

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapperTests.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -722,15 +722,17 @@ public void testSparseVectorMappingUpdate() throws IOException {
722722
String fieldName = "field";
723723

724724
MapperService mapperService = createMapperService(
725-
mapping(b -> addSemanticTextMapping(
726-
b,
727-
fieldName,
728-
model.getInferenceEntityId(),
729-
null,
730-
chunkingSettings,
731-
indexOptions,
732-
new MinimalServiceSettings(model)
733-
)),
725+
mapping(
726+
b -> addSemanticTextMapping(
727+
b,
728+
fieldName,
729+
model.getInferenceEntityId(),
730+
null,
731+
chunkingSettings,
732+
indexOptions,
733+
new MinimalServiceSettings(model)
734+
)
735+
),
734736
useLegacyFormat
735737
);
736738
assertSemanticTextField(mapperService, fieldName, true, chunkingSettings, indexOptions);
@@ -1217,14 +1219,7 @@ public void testModelSettingsRequiredWithChunks() throws IOException {
12171219
);
12181220

12191221
MapperService mapperService = createMapperService(
1220-
mapping(b -> addSemanticTextMapping(
1221-
b,
1222-
"field",
1223-
model.getInferenceEntityId(),
1224-
null,
1225-
chunkingSettings,
1226-
indexOptions
1227-
)),
1222+
mapping(b -> addSemanticTextMapping(b, "field", model.getInferenceEntityId(), null, chunkingSettings, indexOptions)),
12281223
useLegacyFormat
12291224
);
12301225
SourceToParse source = source(b -> addSemanticTextInferenceResults(useLegacyFormat, b, List.of(inferenceResults)));
@@ -1726,6 +1721,7 @@ protected void assertExistsQuery(MappedFieldType fieldType, Query query, LuceneD
17261721
// Until a doc is indexed, the query is rewritten as match no docs
17271722
assertThat(query, instanceOf(MatchNoDocsQuery.class));
17281723
}
1724+
17291725
private static void addSemanticTextMapping(
17301726
XContentBuilder mappingBuilder,
17311727
String fieldName,

0 commit comments

Comments
 (0)