Created
May 13, 2016 13:51
-
-
Save pat-humphreys/f6dc3ff2f51e5c588ddff9883922935e to your computer and use it in GitHub Desktop.
Collection of useful elasticsearch commands
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
#If elasticsearch has unassigned replicas that it isnt assigning (normally after a cluster restart/recovery). | |
#Realocation and merging might need to be re-enabled | |
#Might need to be done on all nodes | |
curl -XPUT 'localhost:9200/_settings' -d '{"index.routing.allocation.disable_allocation": false}' | |
#Lists all keys for an index | |
curl localhost:9200/index-name/index-type/_search/?size=1000&pretty=1 | |
#Turns off/on index replicas | |
curl -XPUT localhost:9200/index-name/_settings -d '{"number_of_replicas": 0}' | |
#Disable throttling | |
curl -XPUT localhost:9200/_cluster/settings -d '{"transient" : {"indices.store.throttle.type" : "none" }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment