Is it possible to set default number of replicas in elasticsearch

I haven't run into this problem in quite a while but I also haven't played with a single node in quite a while either.
I think you should set your discovery type to single node.
discovery.type: single-node # configure as single-node cluster

If you're still having problems you can use an index template and set it to apply to * (all indices)

you can do that in kibana under management or do this in the console

PUT _template/no-replicas
{
  "index_patterns": [
    "*"
  ],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}

Then any index you create will default to 1 shard and 0 zero replicas

1 Like