Skip to content

Instantly share code, notes, and snippets.

@markuskont
Last active September 15, 2016 07:00
Show Gist options
  • Save markuskont/77fc367ee3dbc9586abc6e74579875b6 to your computer and use it in GitHub Desktop.
Save markuskont/77fc367ee3dbc9586abc6e74579875b6 to your computer and use it in GitHub Desktop.
for indice in `pcregrep --color -o1 '^\S+\s+\S+\s+(\S+)' indices.txt `; do
curl -ss -XPUT localhost:9200/$indice/_settings -d '
{
"index" : {
"number_of_replicas" : 0
}
}'
done
for indice in `pcregrep --color -o1 '^\S+\s+\S+\s+(\S+)' indices.txt `; do
curl -ss -XPUT localhost:9200/$indice/_settings -d '
{
"index" : {
"routing" : {
"allocation" : {
"total_shards_per_node" : "2"
}
},
"number_of_replicas" : 1
}
}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment