younifyd
Menu

Bulk index or delete documents (PUT /_bulk)

Bulk index or delete documents

PUT/_bulk

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Bulk index or delete documents (PUT /_bulk) action (under document).
  3. Fill in the fields below, then reference the result from later steps as {{bulkIndexOrDeleteDocumentsPutBulk.response.data}}.

Request

Query parameters

include_source_on_errorboolean

True or false if to include the document source in the error message in case of parsing errors.

list_executed_pipelinesboolean

If `true`, the response will include the ingest pipelines that were run for each index or create.

pipelinestring

The pipeline identifier to use to preprocess incoming documents. If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. If a final pipeline is configured, it will always run regardless of the value of this parameter.

refreshstring

If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search. If `wait_for`, wait for a refresh to make this operation visible to search. If `false`, do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.

One oftruefalsewait_for

routingoneOf

A custom value that is used to route operations to a specific shard.

_sourceoneOf

Indicates whether to return the `_source` field (`true` or `false`) or contains a list of fields to return.

_source_excludesoneOf

A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored.

_source_includesoneOf

A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored.

timeoutoneOf

The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards. The default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur.

wait_for_active_shardsoneOf

The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). The default is `1`, which waits for each primary shard to be active.

require_aliasboolean

If `true`, the request's actions must target an index alias.

require_data_streamboolean

If `true`, the request's actions must target a data stream (existing or to be created).

Response

Returns 200 with an object. Read it in later steps with {{bulkIndexOrDeleteDocumentsPutBulk.response.data.<field>}}.

errorsboolean

If `true`, one or more of the operations in the bulk request did not complete successfully.

itemsarray<object>

The result of each operation in the bulk request, in the order they were submitted.

tooknumber

The length of time, in milliseconds, it took to process the bulk request.

ingest_tooknumber
json
{
  "errors": false,
  "items": [
    {}
  ],
  "took": 0,
  "ingest_took": 0
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Bulk index or delete documents (PUT /_bulk) — Elasticsearch — Documentation