Skip to content

Commit 3be5eda

Browse files
committed
Go back to allowing null updateS
1 parent 9e247c9 commit 3be5eda

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,13 +1234,11 @@ private static boolean canMergeIndexOptions(SemanticTextIndexOptions previous, S
12341234
return true;
12351235
}
12361236

1237-
SemanticTextIndexOptions.SupportedIndexOptions previousType = previous != null ? previous.type() : null;
1238-
SemanticTextIndexOptions.SupportedIndexOptions currentType = current != null ? current.type() : null;
1239-
if (Objects.equals(previousType, currentType) == false) {
1240-
conflicts.addConflict(INDEX_OPTIONS_FIELD, "Incompatible index options");
1237+
if (previous == null || current == null) {
1238+
return true;
12411239
}
12421240

1243-
if (previousType == SemanticTextIndexOptions.SupportedIndexOptions.DENSE_VECTOR) {
1241+
if (previous.type() == SemanticTextIndexOptions.SupportedIndexOptions.DENSE_VECTOR) {
12441242
DenseVectorFieldMapper.DenseVectorIndexOptions previousDenseOptions = (DenseVectorFieldMapper.DenseVectorIndexOptions) previous
12451243
.indexOptions();
12461244
DenseVectorFieldMapper.DenseVectorIndexOptions currentDenseOptions = (DenseVectorFieldMapper.DenseVectorIndexOptions) current

0 commit comments

Comments
 (0)