一、静态settings
只能在索引创建时或者在状态为 closed index(闭合的索引)上设置。

设置名含义
index.number_of_shards主分片数,默认为5.只能在创建索引时设置,不能修改
index.shard.check_on_startup当检查到分片损坏将禁止分片被打开,选项*false、true、fixchecksum *
index.codec默认使用LZ4压缩方式存储数据,也可以设置为 best_compression
index.routing_partition_size自定义路由值可以转发的目的分片数。默认为
1,只能在索引创建时设置。此值必须小于index.number_of_shards

二、动态settings
curl -H "Content-Type: application/json" -XPUT 127.0
.0.1:5607/point_log/_settings-d '{ "index.max_result_window" :"200000"}'
设置名含义
index.number_of_replicas每个主分片的副本数。默认为 1
index.auto_expand_replicas基于可用节点的数量自动分配副本数量,默认为 false(即禁用此功能)
index.refresh_interval执行刷新操作的频率。默认为 1s。可以设置为 -1 以禁用刷新。
index.max_result_window用于索引搜索的 from+size 的最大值。默认为 10000
index.blocks.read_only设置为 true 使索引和索引元数据为只读,false 为允许写入和元数据更改。
index.blocks.read设置为 true 可禁用对索引的读取操作
index.blocks.write设置为 true 可禁用对索引的写入操作
index.blocks.metadata设置为 true 可禁用索引元数据的读取和写入
index.max_refresh_listeners索引的每个分片上可用的最大刷新侦听器数
index.max_docvalue_fields_search一次查询最多包含开启doc_values字段的个数,默认为100
index.max_script_fields查询中允许的最大script_fields数量。默认为32。
index.max_terms_count可以在terms查询中使用的术语的最大数量。默认为65536。
index.routing.allocation.enableAllocation机制。all、primaries、new_primaries、none
index.routing.rebalance.enable索引的分片重新平衡机制。all、primaries、replicas、none
index.gc_deletes文档删除后(删除后版本号)还可以存活的周期,默认为60s
index.max_regex_length用于正在表达式查询(regex query)正在表达式长度,默认为1000

技术
今日推荐
PPT
阅读数 135
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信