diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java index 06d5cd6f85d..9361c877d38 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java @@ -1111,7 +1111,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen } int numberOfReplicas = maybeNumberOfReplicas; if (numberOfReplicas < 0) { - throw new IllegalArgumentException("must specify non-negative number of shards for index [" + index + "]"); + throw new IllegalArgumentException("must specify non-negative number of replicas for index [" + index + "]"); } int routingPartitionSize = INDEX_ROUTING_PARTITION_SIZE_SETTING.get(settings);