This plugin will bulk-update every document in the index with the data it recieves.
Start by specifying the elasticsearch version in the pom.xml.
... <elasticsearch.version>0.17.7</elasticsearch.version> ...
Use maven to build the package
mvn package
Then install the plugin
# if you've built it locally $ES_HOME/bin/plugin -url ./target -install bulktag # if you just want to install the pre-built package from github $ES_HOME/bin/plugin install egaumer/bulktag
Start by indexing some sample doucuments
curl -XPOST http://localhost:9200/index/type1/1/ -d'{"name":"doc1"}' curl -XPOST http://localhost:9200/index/type1/2/ -d'{"name":"doc2"}' curl -XPOST http://localhost:9200/index/type1/3/ -d'{"name":"doc3"}'
Use a search and verify things were indexed
curl 'http://localhost:9200/index/type1/_search?q=*&pretty=true'
To add a set of tags to each of these documents, POST to the new endpoint.
curl -XPOST http://localhost:9200/_bulktag -d '{"tags":["red","blue","green"]}'
Perform another search and verify the documents were all updated.
Note
This HTTP call is asynchornous meaning the call will start the update and immediately return. If you are updating a large number of documents, it could take several minutes (or longer) to actually complete. Yoi can watch the logs to track progress and look for failures.