Elasticsearch Reference Card
Jump to navigation
Jump to search
1 OVERVIEW
- get version and details
curl -XGET 'http://localhost:9200'
2 CLUSTER AND NODE
curl 'http://localhost:9200/_cluster/health?pretty' curl 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s&pretty' curl 'http://localhost:9200/_cluster/state?pretty' curl 'http://localhost:9200/_cluster/stats?human&pretty' curl 'http://localhost:9200/_cluster/pending_tasks?pretty' curl 'http://localhost:9200/_nodes?pretty' curl 'http://localhost:9200/_nodes/stats?pretty' curl 'http://localhost:9200/_nodes/nodeId1,nodeId2/stats?pretty'
- full settings
curl 'http://localhost:9200/_cluster/settings?include_defaults=true&flat_settings=true&pretty'
3 INDICES
- list
curl -X GET 'http://localhost:9200/_cat/indices?v'
- delete
curl -X DELETE 'http://localhost:9200/examples'
- back up
curl -XPOST --header 'Content-Type: application/json' http://localhost:9200/_reindex -d '{ "source": { "index1": "someexamples" }, "dest": { "index2": "someexamples_copy" } }'