Skip to content

Commit c3d4005

Browse files
committed
When the 'strict' mapping option is enabled, make sure to validate split_queries_on_whitespace.
1 parent 0cfa12f commit c3d4005

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ public void checkCompatibility(MappedFieldType otherFT, List<String> conflicts,
222222
if (Objects.equals(normalizer, other.normalizer) == false) {
223223
conflicts.add("mapper [" + name() + "] has different [normalizer]");
224224
}
225+
if (strict) {
226+
if (splitQueriesOnWhitespace != other.splitQueriesOnWhitespace) {
227+
conflicts.add("mapper [" + name() + "] is used by multiple types. Set update_all_types" +
228+
" to true to update [split_queries_on_whitespace] across all types.");
229+
}
230+
}
225231
}
226232

227233
@Override

0 commit comments

Comments
 (0)