📜  Elasticsearch-索引模块

📅  最后修改于: 2020-10-30 14:22:01             🧑  作者: Mango


这些是为每个索引创建的模块,用于控制索引的设置和行为。例如,索引可以使用多少个分片或该索引的主分片可以具有的副本数等。索引设置有两种类型-

  • 静态-这些只能在索引创建时或在封闭索引上设置。
  • 动态-这些可以在实时索引上更改。

静态索引设置

下表显示了静态索引设置的列表-

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

动态索引设置

下表显示了动态索引设置的列表-

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.