ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 查看自动分片是否开启 root@elk-230:~# curl -XGET '192.168.86.230:9200/_cluster/settings' {"persistent":{"cluster":{"routing":{"allocation":{"enable":"none"}}}},"transient":{}}root@elk-230:~# ### 查看未被分片的索引 curl -XGET 'http://192.168.86.230:9200/_cat/shards'|grep UNASSIGNED ### 查看某个索引的副本数 curl -XGET '192.168.86.230:9200/news/_settings' -H 'Content-Type:application/json' ### 修改索引的副本为0 root@elk-230:~# curl -XPUT '192.168.86.230:9200/_all/_settings' -H 'Content-Type:application/json' -d '{ "index" : { "number_of_replicas" : 0 } }' ### 修改所有索引的副本为1 root@elk-230:~# curl -XPUT '192.168.86.230:9200/_all/_settings' -H 'Content-Type:application/json' -d '{ "index" : { "number_of_replicas" : 1 } }' ### 开启所有集群的自动分片 curl -XPUT '192.168.86.230:9200/_cluster/settings' -H 'Content-Type:application/json' -d '{ "persistent": { "cluster.routing.allocation.enable": null } }' 问题原因: 因为测试分词插件需要重启, 所以安装官方的做法先关闭集群分片功能, 但是做完后忘记回复节点分片了.