elasticsearch healh状态为yellow
程序员文章站
2024-02-27 14:06:57
...
首先查看索引状态
curl -XGET "http://localhost:9200/_cat/indices?v"
yellow open twitter Ocd_zNBeSPmMRNR5YFjSug 5 1 2 0 9.8kb 9.8kb
yellow open test MTpbi7_UQnOiJ_UU0X8AXg 1 1 1 0 4.5kb 4.5kb
设置所有副本(rep)个数为0
curl -XPUT "http://localhost:9200/_settings" -H 'Content-Type: application/json' -d'
{
"index" : {
"number_of_replicas" : 0
}
}'
再次查看索引状态
curl -XGET "http://localhost:9200/_cat/indices?v"
green open twitter Ocd_zNBeSPmMRNR5YFjSug 5 0 2 0 9.8kb 9.8kb
green open test MTpbi7_UQnOiJ_UU0X8AXg 1 0 1 0 4.5kb 4.5kb
下一篇: Getting Started