How Do I Change the Number of Replicas for Elasticsearch Indexes in CSS?
When creating an index for an Elasticsearch cluster, you can specify the number of shards, that is, the number of primary shards. Once an index is created, the number of primary shards cannot be changed, but the number of replicas can be changed. Number of replica shards = Number of primary shards x Number of replicas.
- Log in to Kibana and go to the command execution page. Elasticsearch clusters support multiple access methods. This topic uses Kibana as an example to describe the operation procedures.
- Log in to the CSS management console.
- In the navigation pane on the left, choose Clusters > Elasticsearch.
- In the cluster list, find the target cluster, and click Kibana in the Operation column to log in to the Kibana console.
- In the left navigation pane, choose Dev Tools.
- On the Kibana console, run the following command to check the number of replicas for each Elasticsearch index:
GET _cat/indices?v
Figure 1 Checking the number of replicas - Run the following command to configure the number of index replicas:
PUT /indexname/_settings { "number_of_replicas" :1 //Number of replicas }
indexname indicates the name of the index to be modified, and number_of_replicas indicates the number of replicas to be set.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot