Last active
January 4, 2016 21:59
-
-
Save fdv/8684552 to your computer and use it in GitHub Desktop.
In case your Elasticsearch cluster goes red and refuses to assign some shards anymore...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Seems you have 2 solutions left: | |
# - either you trash the whole index and reindex. Good luck, have fun | |
# - or you manually reallocate the whole thing | |
# | |
# Guess what I'll pick up | |
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ | |
"commands": [ | |
{ | |
"allocate": { | |
"index": "YOURFUCKINGINDEX", | |
"shard": YOURBLOODYSHARD, | |
"node": "ANYFUCKINGDATANODE", | |
"allow_primary": 1 | |
} | |
} | |
] | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment