Elasticsearch - Index Modules



These are the modules which are created for every index and control the settings and behaviour of the indices. For example, how many shards an index can use or the number of replicas a primary shard can have for that index etc. There are two types of index settings −

  • Static − These can be set only at index creation time or on a closed index.
  • Dynamic − These can be changed on a live index.

Static Index Settings

The following table shows the list of static index settings −

Setting Possible value Description
index.number_of_shards Defaults to 5, Maximum 1024 The number of primary shards that an index should have.
index.shard.check_on_startup Defaults to false. Can be True Whether or not shards should be checked for corruption before opening.
index.codec LZ4 compression. Type of compression used to store data.
index.routing_partition_size 1 The number of shards a custom routing value can go to.
index.load_fixed_bitset_filters_eagerly false Indicates whether cached filters are pre-loaded for nested queries

Dynamic Index Settings

The following table shows the list of dynamic index settings −

Setting Possible value Description
index.number_of_replicas Defaults to 1 The number of replicas each primary shard has.
index.auto_expand_replicas A dash delimited lower and upper bound (0-5) Auto-expand the number of replicas based on the number of data nodes in the cluster.
index.search.idle.after 30seconds How long a shard cannot receive a search or get request until it’s considered search idle.
index.refresh_interval 1 second How often to perform a refresh operation, which makes recent changes to the index visible to search.
Advertisements