Skip to content

Instantly share code, notes, and snippets.

@mudge
mudge / gist:6062586
Last active June 5, 2016 15:10
Convert Elasticsearch search output into bulk format.
paste -d '\n' <(curl 127.0.0.1:9200/collection/_search | jq -c '.hits.hits[] | {"index": {_index, _type, _id}}') <(curl 127.0.0.1:9200/collection/_search | jq -c '.hits.hits[]._source')