diff --git a/core/src/main/java/org/elasticsearch/common/settings/AbstractScopedSettings.java b/core/src/main/java/org/elasticsearch/common/settings/AbstractScopedSettings.java index 05b7d96c8f6db..717f9a258a7e6 100644 --- a/core/src/main/java/org/elasticsearch/common/settings/AbstractScopedSettings.java +++ b/core/src/main/java/org/elasticsearch/common/settings/AbstractScopedSettings.java @@ -509,7 +509,7 @@ private static boolean applyDeletes(Set deletes, Settings.Builder builde Set keysToRemove = new HashSet<>(); Set keySet = builder.internalMap().keySet(); for (String key : keySet) { - if (Regex.simpleMatch(entry, key) && canRemove.test(key)) { + if ( (Regex.simpleMatch(entry, key) || Regex.simpleMatch(entry + ".*", key)) && canRemove.test(key)) { // we have to re-check with canRemove here since we might have a wildcard expression foo.* that matches // dynamic as well as static settings if that is the case we might remove static settings since we resolve the // wildcards late