Elasticsearch Default Replica Value

In Elasticsearch 6.2 is there a setting somewhere that assigns a default replica value of "1" somewhere?

Our index templates do not assign a replica value, but our indexes are indeed replicated. We would like to know where the replica config ordinates from.

-Tony

It's a builtin default value. You can overwrite this by setting your own index template: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html

PUT _template/replicas_0
{
  "index_patterns": ["*"],
  "settings": {
    "number_of_replicas": 0
  }
}

Are you saying the "builtin default value" is not changeable itself? I knew the value could be overwritten with the the use of the index templates.

Thanks for the response!

-Tony

Are you saying the "builtin default value" is not changeable itself?

It is. But with an index template. The built-in default value is basically like an index template with the lowest priority.

Otherwise, if you really want to overwrite the default value, then you need to change the source code and recompile with your default value. I'm pretty sure you will prefer an index template :stuck_out_tongue:

Ok. Makes sense! Thanks.

-Tony

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.