public static Settings.Builder defaults() {
Settings.Builder builder = Settings.builder()
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
- .put("index.refresh_interval", "30s")
- .put("index.mapper.dynamic", false);
+ .put("index.refresh_interval", "30s");
Arrays.stream(DefaultIndexSettingsElement.values())
.map(DefaultIndexSettingsElement::settings)
}
private void applySettingsConfiguration(SettingsConfiguration settingsConfiguration) {
- settings.put("index.mapper.dynamic", valueOf(false));
settings.put("index.refresh_interval", refreshInterval(settingsConfiguration));
Configuration config = settingsConfiguration.getConfiguration();
.getSettings().build();
assertThat(underTest.get("index.number_of_shards")).isNotEmpty();
- assertThat(underTest.get("index.mapper.dynamic")).isEqualTo("false");
+ // index.mapper.dynamic is deprecated and should not be set anymore
+ assertThat(underTest.get("index.mapper.dynamic")).isNull();
assertThat(underTest.get("index.refresh_interval")).isEqualTo("30s");
// setting "mapping.single_type" has been dropped in 6.X because multi type indices are not supported anymore
assertThat(underTest.get("mapping.single_type")).isNull();
Settings underTest = new SimplestNewIndex(IndexType.main(index, "foo"), defaultSettingsConfiguration).getSettings().build();
assertThat(underTest.get("index.number_of_shards")).isNotEmpty();
- assertThat(underTest.get("index.mapper.dynamic")).isEqualTo("false");
+ // index.mapper.dynamic is deprecated and should not be set anymore
+ assertThat(underTest.get("index.mapper.dynamic")).isNull();
assertThat(underTest.get("index.refresh_interval")).isEqualTo("30s");
// setting "mapping.single_type" has been dropped in 6.X because multi type indices are not supported anymore
assertThat(underTest.get("mapping.single_type")).isNull();