Elasticsearch bulk indexing from the command line

If you need to import some json documents into Elasticsearch, but don't want to install all kind of third party tooling or java, just install jq.

cat file.json | jq -c '{"index": {"_index": "bookmarks", "_type": "bookmark", "_id": .id}}, .' | curl -XPOST localhost:9200/_bulk --data-binary @-  

(found at http://stackoverflow.com/questions/20646836/is-there-any-way-to-import-a-json-filecontains-100-documents-in-elasticsearch)