astuce pour changemer le nombre de replica en masse
This commit is contained in:
parent
d1f21da0ce
commit
d75f7b268c
|
@ -707,4 +707,12 @@ $ curl -XGET "http://localhost:9200/_cat/shards?v"
|
|||
|
||||
~~~
|
||||
$ curl -XGET 'http://127.0.0.1:9200/_cluster/health?level=indices&pretty'
|
||||
~~~
|
||||
|
||||
### Modifier en masse le nombre de replica :
|
||||
|
||||
Par exemple sur un cluster avec un seul nœud, one ne veut pas de replica. On prend alors tous les index en état "yellow" tet on passe le nombre de replica à "0".
|
||||
|
||||
~~~
|
||||
# for index in $(curl 127.0.0.1:9200/_cat/indices/?h=index&health=yellow); do curl -X PUT 127.0.0.1:9200/$index/_settings -H 'Content-Type: application/json' -d '{ "index": {"number_of_replicas": 0} }'; done
|
||||
~~~
|
Loading…
Reference in a new issue