Fixup default number of shards
@@ -474,7 +474,7 @@ public final class IndexSettings {
logger = Loggers.getLogger(getClass(), index);
nodeName = Node.NODE_NAME_SETTING.get(settings);
this.indexMetaData = indexMetaData;
- numberOfShards = settings.getAsInt(IndexMetaData.SETTING_NUMBER_OF_SHARDS, null);
+ numberOfShards = settings.getAsInt(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1);
this.searchThrottled = INDEX_SEARCH_THROTTLED.get(settings);
this.queryStringLenient = QUERY_STRING_LENIENT_SETTING.get(settings);
