Skip to content

egaumer/bulktag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElasticSearch BulkTag Plugin

Perform Bulk Partial updates to indexed documents

This plugin will bulk-update every document in the index with the data it recieves.

How do you build this plugin?

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

How to use this plugin.

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.

About

An elasticsearch bulk tagging plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages