文章目录
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/a33ac845ba08b3df3a5e6dafab1a48f1.png)
1.概述
其他文章:https://blog.csdn.net/qq_21383435/article/details/79323383?utm_source=blogxgwz9
2.索引配置
索引可以设置的setting可以在官方文档的Index modules查看
先从静态开始:
index.number_of_shards
:指定索引的分片数,只能在创建索引时设置。默认是1,最大可以设置为1024
。这是出于安全考虑的一种保护措施。最大值可以通过设置系统变量来控制export ES_JAVA_OPTS="-Des.index.max_number_of_shards=128"
index.routing_partition_size
:可以路由的分片数量,同样只能在创建索引时指定,默认值为1.这个值必须小于number_of_shards
(除非number_of_shards
的值也是1)
index.number_of_shards
:
索引应该具有的主碎片的数量,默认为1。此设置只能在创建索引时设置&#