ElasticSearch Installation

Online Training

The Bulk API in Elasticsearch

posted by Lianamelissa on Sep 06, 2018

The bulk API makes it possible to perform many index/delete operations in a single API call. This can greatly increase the indexing speed.

Client support for bulk requests

Some of the officially supported clients provide helpers to assist with bulk requests and reindexing of documents from one index to another:

The REST API endpoint is /_bulk, and it expects the following JSON structure:

action_and_meta_datan optional_sourcen action_and_meta_datan optional_sourcen action_and_meta_datan optional_sourcen

NOTE: the final line of data must end with a newline character n.

Learn how to use Elasticsearch, from beginner basics to advanced techniques, with online video tutorials taught by industry experts. Enroll for Free Elasticsearch Training Demo!

The possible actions are index, create, delete and update. index and create expect a source on the next line, and have the same semantics as the op_type parameter to the standard index API (i.e. create will fail if a document with the same index and type exists already, whereas index will add or replace a document as necessary). delete does not expect a source on the following line, and has the same semantics as the standard delete API. update expects that the partial doc, upsert and script and its options are specified on the next line.

For more information visit Mindmajix

4 visits |0 Comments|Reply

There are no comments on this post

Write a New Comment on The Bulk API in Elasticsearch

Please Log In or Register to post comments.