【elasticsearch】elasticsearch集群分片数设置导致集群状态yellow的处理

$ curl -X GET -s 127.0.0.1:9200/_cluster/health?pretty


$ curl 127.0.0.1:9200/withdrewmsg/_settings?pretty



应该将分片数设置为 2 


确定主节点

$ curl -X GET -s http://127.0.0.1:9200/_cat/nodes?pretty



$ curl -XPUT 172.16.6.125:9200/withdrewmsg/_settings -d '{"index":{"number_of_replicas":2}}'



参考

https://www.zhangbj.com/p/283.html

推荐阅读更多精彩内容