Skip to content

Commit 4a70860

Browse files
committed
and fix more tests
1 parent 420914e commit 4a70860

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,19 +790,20 @@ public void testUpdateSearchInferenceId() throws IOException {
790790
inferenceId,
791791
new MinimalServiceSettings("my-service", TaskType.SPARSE_EMBEDDING, null, null, null)
792792
);
793-
assertSemanticTextField(mapperService, fieldName, true, null, null);
793+
var expectedIndexOptions = getDefaultIndexOptionsForMapper(mapperService);
794+
assertSemanticTextField(mapperService, fieldName, true, null, expectedIndexOptions);
794795
assertInferenceEndpoints(mapperService, fieldName, inferenceId, inferenceId);
795796

796797
merge(mapperService, buildMapping.apply(fieldName, searchInferenceId1));
797-
assertSemanticTextField(mapperService, fieldName, true, null, null);
798+
assertSemanticTextField(mapperService, fieldName, true, null, expectedIndexOptions);
798799
assertInferenceEndpoints(mapperService, fieldName, inferenceId, searchInferenceId1);
799800

800801
merge(mapperService, buildMapping.apply(fieldName, searchInferenceId2));
801-
assertSemanticTextField(mapperService, fieldName, true, null, null);
802+
assertSemanticTextField(mapperService, fieldName, true, null, expectedIndexOptions);
802803
assertInferenceEndpoints(mapperService, fieldName, inferenceId, searchInferenceId2);
803804

804805
merge(mapperService, buildMapping.apply(fieldName, null));
805-
assertSemanticTextField(mapperService, fieldName, true, null, null);
806+
assertSemanticTextField(mapperService, fieldName, true, null, expectedIndexOptions);
806807
assertInferenceEndpoints(mapperService, fieldName, inferenceId, inferenceId);
807808
}
808809
}

0 commit comments

Comments
 (0)