forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: zhengxiu <zhengxiu@huawei.com> Co-committed-by: zhengxiu <zhengxiu@huawei.com>
21 lines
2.7 KiB
HTML
21 lines
2.7 KiB
HTML
<a name="css_02_0089"></a><a name="css_02_0089"></a>
|
|
|
|
<h1 class="topictitle1">How Do I Change the Number of Replicas for Elasticsearch Indexes in CSS?</h1>
|
|
<div id="body1594694216151"><p id="css_02_0089__p147534195221">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. <strong id="css_02_0089__b4153154310416">Number of replica shards = Number of primary shards x Number of replicas.</strong></p>
|
|
<p id="css_02_0089__p1434961515211">You can change the number of index replicas of an Elasticsearch cluster in Kibana.</p>
|
|
<ol id="css_02_0089__ol07902140177"><li id="css_02_0089__en-us_topic_0000001223594412_li1865174111515">Log in to the CSS management console.</li><li id="css_02_0089__en-us_topic_0000001223594412_li105976015474">In the navigation pane on the left, choose <span class="uicontrol" id="css_02_0089__uicontrol85518849494014"><b>Clusters</b></span> > <strong id="css_02_0089__b6973108694014">Elasticsearch</strong>.</li><li id="css_02_0089__en-us_topic_0000001223594412_li1274935516811">Locate the target cluster, and click <strong id="css_02_0089__b19748970194014">Access Kibana</strong> in the <strong id="css_02_0089__b63502572794014">Operation</strong> column to log in to Kibana.</li><li id="css_02_0089__en-us_topic_0000001223594412_li927171291011">Click <strong id="css_02_0089__b164179349694014">Dev Tools</strong> in the navigation tree on the left.</li><li id="css_02_0089__li14862181111420">On the Kibana console, run the following command to check the number of replicas for each Elasticsearch index:<pre class="screen" id="css_02_0089__screen201501640346">GET _cat/indices?v</pre>
|
|
<div class="fignone" id="css_02_0089__fig985919114415"><span class="figcap"><b>Figure 1 </b>Checking the number of replicas</span><br><span><img id="css_02_0089__image4252362162" src="en-us_image_0000002021082885.png"></span></div>
|
|
</li><li id="css_02_0089__li3398121621715">Run the following command to configure the number of index replicas:<pre class="screen" id="css_02_0089__screen13254200258">PUT /indexname/_settings
|
|
{
|
|
"number_of_replicas" :1 //Number of replicas
|
|
}</pre>
|
|
<p id="css_02_0089__p427311208613"><span class="parmname" id="css_02_0089__parmname351311268615"><b>indexname</b></span> indicates the name of the index to be modified, and <span class="parmname" id="css_02_0089__parmname1214119291068"><b>number_of_replicas</b></span> indicates the number of replicas to be set.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_02_0055.html">Using CSS Cluster Search Engines</a></div>
|
|
</div>
|
|
</div>
|
|
|