Make the number of shards and replicas tunable

The shard count and replica count are some of the primary ways to tune
an elasticsearch cluster and should be tunable through this template.

Change-Id: Id6dd65ed3ca75e464f294774282eb36f6c001c67
This commit is contained in:
K Jonathan Harker 2015-02-10 15:48:18 -08:00
parent 9ec09cf603
commit c6ac0c47f3
1 changed files with 8 additions and 0 deletions

View File

@ -109,11 +109,19 @@ node.data: <%= es_template_config['node.data'] %>
# Set the number of shards (splits) of an index (5 by default):
#
<% if es_template_config.has_key?('index.number_of_shards') then -%>
index.number_of_shards: <%= es_template_config['index.number_of_shards'] %>
<% else -%>
# index.number_of_shards: 5
<% end -%>
# Set the number of replicas (additional copies) of an index (1 by default):
#
<% if es_template_config.has_key?('index.number_of_replicas') then -%>
index.number_of_replicas: <%= es_template_config['index.number_of_replicas'] %>
<% else -%>
# index.number_of_replicas: 1
<% end -%>
# Note, that for development on a local machine, with small indices, it usually
# makes sense to "disable" the distributed features: