ElasticSearch: Unassigned Shards, how to fix?

前端 未结 24 1057
悲&欢浪女
悲&欢浪女 2020-12-04 05:03

I have an ES cluster with 4 nodes:

number_of_replicas: 1
search01 - master: false, data: false
search02 - master: true, data: true
search03 - master: false,          


        
24条回答
  •  有刺的猬
    2020-12-04 05:33

    In my case, when I create a new index then the default number_of_replicas is set as 1. And the number of nodes in my cluster was only one so there was no extra node to create the replica, so the health was turning to yellow. So when I created the index with settings property and set the number_of_replicas as 0. Then it worked fine. Hope this helps.

    PUT /customer
    {
        "settings": {
            "number_of_replicas": 0
        }
    }
    

提交回复
热议问题