add_document
Insert or update documents into a specified Elasticsearch index, enabling structured data storage and retrieval for efficient search operations.
Instructions
Add a new document to a specific Elasticsearch index
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document | Yes | Document body to index | |
| id | No | Optional document ID (if not provided, Elasticsearch will generate one) | |
| index | Yes | Name of the Elasticsearch index |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"document": {
"additionalProperties": {},
"description": "Document body to index",
"type": "object"
},
"id": {
"description": "Optional document ID (if not provided, Elasticsearch will generate one)",
"type": "string"
},
"index": {
"description": "Name of the Elasticsearch index",
"minLength": 1,
"type": "string"
}
},
"required": [
"index",
"document"
],
"type": "object"
}