Skip to content

Commit 5ba2fb1

Browse files
committed
Remove reference to INDEX_MAPPER_DYNAMIC_SETTING in AutoCreateIndex
Signed-off-by: Craig Perkins <[email protected]>
1 parent d1239c3 commit 5ba2fb1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.opensearch.common.settings.Settings;
4444
import org.opensearch.core.common.Strings;
4545
import org.opensearch.index.IndexNotFoundException;
46-
import org.opensearch.index.mapper.MapperService;
4746
import org.opensearch.indices.SystemIndices;
4847

4948
import java.util.ArrayList;
@@ -64,8 +63,6 @@ public final class AutoCreateIndex {
6463
Property.NodeScope,
6564
Setting.Property.Dynamic
6665
);
67-
68-
private final boolean dynamicMappingDisabled;
6966
private final IndexNameExpressionResolver resolver;
7067
private final SystemIndices systemIndices;
7168
private volatile AutoCreate autoCreate;
@@ -77,7 +74,6 @@ public AutoCreateIndex(
7774
SystemIndices systemIndices
7875
) {
7976
this.resolver = resolver;
80-
dynamicMappingDisabled = !MapperService.INDEX_MAPPER_DYNAMIC_SETTING.get(settings);
8177
this.systemIndices = systemIndices;
8278
this.autoCreate = AUTO_CREATE_INDEX_SETTING.get(settings);
8379
clusterSettings.addSettingsUpdateConsumer(AUTO_CREATE_INDEX_SETTING, this::setAutoCreate);
@@ -109,9 +105,6 @@ public boolean shouldAutoCreate(String index, ClusterState state) {
109105
if (autoCreate.autoCreateIndex == false) {
110106
throw new IndexNotFoundException("[" + AUTO_CREATE_INDEX_SETTING.getKey() + "] is [false]", index);
111107
}
112-
if (dynamicMappingDisabled) {
113-
throw new IndexNotFoundException("[" + MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey() + "] is [false]", index);
114-
}
115108
// matches not set, default value of "true"
116109
if (autoCreate.expressions.isEmpty()) {
117110
return true;

0 commit comments

Comments
 (0)