diff --git a/src/main/java/org/opensearch/securityanalytics/logtype/LogTypeService.java b/src/main/java/org/opensearch/securityanalytics/logtype/LogTypeService.java index 9036f514d..553d3d0af 100644 --- a/src/main/java/org/opensearch/securityanalytics/logtype/LogTypeService.java +++ b/src/main/java/org/opensearch/securityanalytics/logtype/LogTypeService.java @@ -445,7 +445,8 @@ public void ensureConfigIndexIsInitialized(ActionListener listener) { isConfigIndexInitialized = false; Settings indexSettings = Settings.builder() .put("index.hidden", true) - .put("index.auto_expand_replicas", "0-all") + .put("number_of_shards", 1) // Setting pri shard count to 1 to reduce sharding overhead in large clusters since this index is set to auto-expand replicas "all" + .put("index.auto_expand_replicas", "0-all") .build(); CreateIndexRequest createIndexRequest = new CreateIndexRequest(); @@ -789,4 +790,4 @@ public void setLogTypeMappingVersion() { XContentHelper.convertToMap(JsonXContent.jsonXContent, logTypeIndexMapping(), false); this.logTypeMappingVersion = (int)((Map)logTypeConfigAsMap.get("_meta")).get("schema_version"); } -} \ No newline at end of file +}