Skip to content

Instantly share code, notes, and snippets.

@jeduoliveira
Last active March 7, 2023 13:35
Show Gist options
  • Save jeduoliveira/1ffa383b56779aabdeef803ae37aa0eb to your computer and use it in GitHub Desktop.
Save jeduoliveira/1ffa383b56779aabdeef803ae37aa0eb to your computer and use it in GitHub Desktop.
curl -XPUT "localhost:9200/_template/default_template" -H 'Content-Type: application/json' -d '{ "template" : "*", "settings" : { "number_of_replicas" : 0 } }'
curl -H "Content-Type: application/json" -XPUT localhost:9200/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'
curl -H "Content-Type: application/json" -XPUT localhost:9200/_cluster/settings -d '{ "transient" : { "cluster.routing.allocation.enable" : "all" } }'
curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED
curl -H "Content-Type: application/json" -XPUT localhost:9200/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'
curl -XPOST localhost:9200/_cluster/reroute?retry_failed=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment