Complementing what Opster said.
Hence even if you try, ES cluster status becomes yellow, because the a replica shard cannot be assigned to the same machine where your primary shard resides.
Hence even if you try, all your replica shards increases the unassigned_shards counter
Check the status of your cluster
curl -XGET "http://localhost:9200/_cluster/health?pretty"
{
"cluster_name" : "es-test",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 7,
"number_of_data_nodes" : 7,
"discovered_master" : true,
"active_primary_shards" : 8617,
"active_shards" : 11975,
"relocating_shards" : 8,
"initializing_shards" : 0,
"unassigned_shards" : 46,
}
"TIP: The number of shards you can hold on a node will be
proportional to the amount of heap you have available, but there is no
fixed limit enforced by Elasticsearch. A good rule-of-thumb is to
ensure you keep the number of shards per node below 20 per GB heap it
has configured. A node with a 30GB heap should therefore have a
maximum of 600 shards, but the further below this limit you can keep
it the better. This will generally help the cluster stay in good
health."
https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster
Aplicable to primary and replica shards: When you have too many indices, therefore many shards, you start to reach the limit of shards allowed per node. Also take this into account, if you want to modify the primary shards for your new indices.
Or if you want to reindex in order to modify the primary shard settings of your existing indices.