
Elasticsearch Put
CertifiedIndex a document
Elasticsearch Put
Index a document
Indexes or creates a single document in an Elasticsearch index. Accepts a Map or JSON string for value. Default refresh policy is NONE; routing and opType are optional.
type: io.kestra.plugin.elasticsearch.PutExamples
Put a document with a Map
id: elasticsearch_put
namespace: company.team
tasks:
- id: put
type: io.kestra.plugin.elasticsearch.Put
connection:
hosts:
- "http://localhost:9200"
index: "my_index"
key: "my_id"
value:
name: "John Doe"
city: "Paris"
Put a document from a JSON string
id: elasticsearch_put_json
namespace: company.team
inputs:
- id: value
type: JSON
defaults: {"name": "John Doe", "city": "Paris"}
tasks:
- id: put
type: io.kestra.plugin.elasticsearch.Put
connection:
hosts:
- "http://localhost:9200"
index: "my_index"
key: "my_id"
value: "{{ inputs.value }}"
Properties
connection *
Elasticsearch connection
Connection settings shared by tasks; hosts are required.
index *string
Target index
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150contentType string
JSONCBORJSONSMILEYAMLValue content type
Content type for value. Only JSON is currently applied; this hint is not yet honored. Default JSON.
key string
Document id
Optional _id; if omitted, Elasticsearch auto-generates one.
opType string
INDEXCREATEUPDATEDELETEOperation type
Allowed: INDEX or CREATE.
refreshPolicy string
NONEIMMEDIATEWAIT_UNTILNONERefresh policy
When to refresh the index after indexing: IMMEDIATE, WAIT_UNTIL, or NONE (default).
routing string
Custom shard routing
Optional routing key hashed to pick the shard instead of using the document id.
value object
Document body
Map or JSON string rendered at runtime and sent as the document source.
Outputs
id string
Document id
result string
CreatedUpdatedDeletedNotFoundNoOpIndexing result
version integer
Document version