Last active
September 20, 2017 10:57
-
-
Save pedroagabreu/b5e982b0b100f4066458 to your computer and use it in GitHub Desktop.
Elasticsearch query examples using cURL
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
# pull 2M records and drop metadata | |
curl -sN -XPOST 'http://localhost:9200/logstash-2015.11.04/_search' -d '{"sort": ["@timestamp"], "query": {"match": {"who": "me"}}, "from": 0, "size": 1000000}' | jq -c '.hits.hits[]._source' > output.json | |
curl -sN -XPOST 'http://localhost:9200/logstash-2015.11.04/_search' -d '{"sort": ["@timestamp"], "query": {"match": {"who": "me"}}, "from": 1000001, "size": 1000000}' | jq -c '.hits.hits[]._source' > output2.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment