Skip to content

Commit c94955e

Browse files
committed
Cleanup
1 parent 3be5eda commit c94955e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,8 @@ public SemanticTextFieldMapper build(MapperBuilderContext context) {
355355
validateServiceSettings(modelSettings.get(), resolvedModelSettings);
356356
}
357357

358-
// Validate any specified index options
359-
if (context.getMergeReason() != MapperService.MergeReason.MAPPING_RECOVERY) {
360-
if (indexOptions.get() != null) {
361-
// We've specified index options in this request, so we need to validate that they're compatible with our model
362-
validateIndexOptions(indexOptions.get(), inferenceId.getValue(), resolvedModelSettings);
363-
}
358+
if (context.getMergeReason() != MapperService.MergeReason.MAPPING_RECOVERY && indexOptions.get() != null) {
359+
validateIndexOptions(indexOptions.get(), inferenceId.getValue(), resolvedModelSettings);
364360
}
365361

366362
final String fullName = context.buildFullName(leafName());

0 commit comments

Comments
 (0)