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.

Revisions

  1. jeduoliveira revised this gist Mar 7, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions elasticsearch
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,5 @@ curl -H "Content-Type: application/json" -XPUT localhost:9200/_cluster/settings

    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
  2. jeduoliveira revised this gist Jan 31, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion elasticsearch
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,6 @@ curl -H "Content-Type: application/json" -XPUT localhost:9200/_settings -d '{ "i

    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 -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED

    curl -XPOST localhost:9200/_cluster/reroute?retry_failed=true
  3. jeduoliveira revised this gist Jan 31, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion elasticsearch
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,6 @@ curl -XPUT "localhost:9200/_template/default_template" -H 'Content-Type: applica

    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 -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
  4. jeduoliveira created this gist Jan 31, 2023.
    6 changes: 6 additions & 0 deletions elasticsearch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    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" } }'