es_bulk_index
Index multiple documents into a single Elasticsearch index in one request using the _bulk API, with per-document success/failure reporting.
Instructions
Index (create or overwrite) multiple documents into one index in a single request via the Elasticsearch _bulk API (e.g. for seeding test/sample data) — far more efficient than one es_index_doc call per document. Reports per-document success/failure rather than aborting the whole batch on one bad document. Blocked when that connection's own readOnly mode is enabled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Index name. | |
| documents | Yes | JSON array of documents to index. Each item may include an "_id" key to set the document id explicitly (removed before indexing); otherwise Elasticsearch auto-generates one. E.g. '[{"_id":"1","title":"foo"},{"title":"bar"}]' | |
| connectionId | No | Id of the elasticsearch connection to use, from databases.config.yml. Optional when only one elasticsearch connection is configured. |