Created
March 28, 2018 14:54
-
-
Save samyranavela/9534561e0c78d13b9f8154159e9b90ac to your computer and use it in GitHub Desktop.
Dump ES document
This file contains hidden or 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
curl http://localhots:9200/{index}/{type}/_search\?size\=1000 | \ | |
jq -rc '.hits.hits[]' | \ | |
while read -r doc; do echo $doc | \ | |
jq '._source' > tests/fixtures/page/`echo $doc | jq -r '._type'`_`echo $doc | jq -r '._id'`.json; \ | |
done \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment