[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
一、静态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