Last active
March 14, 2022 06:37
-
-
Save osmianski/225bc158c910be534d7ddcfc582685c6 to your computer and use it in GitHub Desktop.
Useful queries for checking ElasticSearch indexes
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
# list all indexes | |
curl 'localhost:9200/_cat/indices?v' | |
# dump the index definition into a file | |
curl 'localhost:9200/{index}/_mapping?pretty' > ~/es_schema.json | |
# dump the index into a file | |
curl -XPOST 'localhost:9200/{index}/_search?pretty' \ | |
-H "Content-Type: application/json" \ | |
-d '{"size": 10000, "query": { "match_all": {} }}' > ~/es_data.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment