Bulk index or delete documents | Elasticsearch API documentation (original) (raw)
Dismiss highlight Show more
Query parameters
- True or false if to include the document source in the error message in case of parsing errors.
- If
true
, the response will include the ingest pipelines that were run for each index or create. - 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. - If
true
, Elasticsearch refreshes the affected shards to make this operation visible to search. Ifwait_for
, wait for a refresh to make this operation visible to search. Iffalse
, do nothing with refreshes. Valid values:true
,false
,wait_for
.
Values aretrue
,false
, orwait_for
. - A custom value that is used to route operations to a specific shard.
- _source
boolean | string | array[string]
Indicates whether to return the_source
field (true
orfalse
) or contains a list of fields to return. - 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 isfalse
, this parameter is ignored. - 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 isfalse
, this parameter is ignored. - 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. - 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 is1
, which waits for each primary shard to be active. - If
true
, the request's actions must target an index alias. - If
true
, the request's actions must target a data stream (existing or to be created).
application/json
Body object Required
Responses
- 200 application/json
Hide response attributes Show response attributes object- If
true
, one or more of the operations in the bulk request did not complete successfully. - items
array[object] Required
The result of each operation in the bulk request, in the order they were submitted.
Hide items attribute Show items attribute object
* *
object Additional properties
Hide * attributes Show * attributes object
* #### _id string | null
The document ID associated with the operation.
* The name of the index associated with the operation. If the operation targeted a data stream, this is the backing index into which the document was written.
* The HTTP status code returned for the operation.
* Values arenot_applicable_or_unknown
,used
,not_enabled
, orfailed
.
* Hide error attributes Show error attributes object
* The type of error
* A human-readable explanation of the error, in English.
* The server stack trace. Present only if theerror_trace=true
parameter was sent with the request.
* The primary term assigned to the document for the operation. This property is returned only for successful operations.
* The result of the operation. Successful values arecreated
,deleted
, andupdated
.
* Hide _shards attributes Show _shards attributes object
* Hide get attributes Show get attributes object
* Hide fields attribute Show fields attribute object
* *
object Additional properties
* Hide _source attribute Show _source attribute object
* *
object Additional properties - The length of time, in milliseconds, it took to process the bulk request.
- If