bulk
Efficiently execute multiple Elasticsearch document operations—create, update, delete—in one API call, reducing requests and optimizing performance.
Instructions
Perform multiple document operations (create, update, delete) in a single API call
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes | Array of operations to perform in bulk | |
| pipeline | No | Optional pipeline to use for preprocessing documents |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"operations": {
"description": "Array of operations to perform in bulk",
"items": {
"additionalProperties": false,
"properties": {
"action": {
"description": "The action to perform: index (create/replace), create (fail if exists), update, or delete",
"enum": [
"index",
"create",
"update",
"delete"
],
"type": "string"
},
"document": {
"additionalProperties": {},
"description": "Document body (required for index/create/update, not used for delete)",
"type": "object"
},
"id": {
"description": "Document ID (required for update and delete, optional for index/create)",
"type": "string"
},
"index": {
"description": "Name of the Elasticsearch index for this operation",
"minLength": 1,
"type": "string"
}
},
"required": [
"action",
"index"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"pipeline": {
"description": "Optional pipeline to use for preprocessing documents",
"type": "string"
}
},
"required": [
"operations"
],
"type": "object"
}