Skip to content

Instantly share code, notes, and snippets.

@drewr
Last active December 26, 2015 23:59
Show Gist options
  • Save drewr/7234564 to your computer and use it in GitHub Desktop.
Save drewr/7234564 to your computer and use it in GitHub Desktop.
Simple bulk-indexing
#!/bin/sh
index=$1
find . -name \*.bulk.gz | while read i; do
gzip -cd $i | curl -XPOST localhost:9200/${index}/_bulk -d@- >/dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment