Elasticsearch Cheat Sheet

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

Thanks for reading! If you have any questions or comments, please send me a note on Twitter.

Please also consider subscribing to my weekly-ish newsletter, where I write short essays, announce new articles, and share other interesting things I've found.