Skip to content

Commit

Permalink
Fix SemanticTextFieldMapperTests
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso committed Dec 2, 2024
1 parent a1c3e66 commit 34af576
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public InferenceFieldMetadata getMetadata(Set<String> sourcePaths) {
String[] copyFields = sourcePaths.toArray(String[]::new);
// ensure consistent order
Arrays.sort(copyFields);
return new InferenceFieldMetadata(fullPath(), fieldType().inferenceId, fieldType().searchInferenceId, copyFields);
return new InferenceFieldMetadata(fullPath(), fieldType().getInferenceId(), fieldType().getSearchInferenceId(), copyFields);
}

@Override
Expand Down Expand Up @@ -441,7 +441,7 @@ public SemanticTextFieldType(
) {
super(name, true, false, false, TextSearchInfo.NONE, meta);
this.inferenceId = inferenceId;
this.searchInferenceId = searchInferenceId == null ? inferenceId : searchInferenceId;
this.searchInferenceId = searchInferenceId;
;
this.modelSettings = modelSettings;
this.inferenceField = inferenceField;
Expand All @@ -458,7 +458,7 @@ public String getInferenceId() {
}

public String getSearchInferenceId() {
return searchInferenceId;
return searchInferenceId == null ? inferenceId : searchInferenceId;
}

public SemanticTextField.ModelSettings getModelSettings() {
Expand Down

0 comments on commit 34af576

Please sign in to comment.