Setting index.auto_expand_replicas in the elasticsearch config file does not apply, closes #1852.

This commit is contained in:
Shay Banon 2012-04-11 20:53:01 +03:00
parent 1f050435b2
commit ae69e7c472
1 changed files with 4 additions and 0 deletions

View File

@ -213,6 +213,10 @@ public class MetaDataCreateIndexService extends AbstractComponent {
}
}
if (settings.get(SETTING_AUTO_EXPAND_REPLICAS) != null && indexSettingsBuilder.get(SETTING_AUTO_EXPAND_REPLICAS) == null) {
indexSettingsBuilder.put(SETTING_AUTO_EXPAND_REPLICAS, settings.get(SETTING_AUTO_EXPAND_REPLICAS));
}
indexSettingsBuilder.put(SETTING_VERSION_CREATED, Version.CURRENT);
Settings actualIndexSettings = indexSettingsBuilder.build();