Elasticsearch Cheat Sheet

Written
  • Shard Allocation Issues
    • http 'localhost:9200/_cluster/allocation/explain?pretty' will explain things with an easy-to-understand vocabulary
  • Rolling Minor Version Upgrade
    1. echo '{"persistent":{"cluster.routing.allocation.enable": "primaries"}}' | http PUT localhost:9200/_cluster/settings
    2. http POST localhost:9200/_flush/synced - First time only
    3. Upgrade a node
    4. echo '{"persistent":{"cluster.routing.allocation.enable": null}}' | http PUT localhost:9200/_cluster/settings
    5. Wait for the node to recover
    6. Repeat until all nodes are upgraded

Thanks for reading! If you have any questions or comments, please send me a note on Twitter. And if you enjoyed this, I also have a newsletter where I send out interesting things I read and the occasional nature photo.

You can check out a recent issue, or enter your email below to subscribe.