Skip to content

Instantly share code, notes, and snippets.

@royingantaginting
Last active September 26, 2016 04:05
Show Gist options
  • Save royingantaginting/564ce3fc4a8302d719a345c7135926fa to your computer and use it in GitHub Desktop.
Save royingantaginting/564ce3fc4a8302d719a345c7135926fa to your computer and use it in GitHub Desktop.
Elasticsearch Scripts
# List all indices in ES and sort the output
curl 'localhost:9200/_cat/indices?v' 2>/dev/null | awk 'NR<2{print $0;next}{print $0| "sort -r"}'
# Turn off replication for all ES indices
curl -XPUT http://localhost:9200/_settings -d '{ "index": { "number_of_replicas": 0 } }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment