elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.98k stars 24.75k forks source link

Update the existing document on the basis of the doc Id in ingest pipeline #114966

Open ikishorkumar opened 1 week ago

ikishorkumar commented 1 week ago

Description

i have 300+ filebeats installed on clients servers. can't use Logstash. can you guys introduce this feature. so we can get all the data in elastic via any source and then using ingest we can also update the doc if the same doc id is found.

Pipeline PUT /_ingest/pipeline/upsert-doc-pipeline { "description": "Pipeline to upsert documents based on _id", "processors": [ { "fingerprint": { "fields": [ "full_name", "person_id" ], "target_field": "_id", "method": "SHA-1" } } ] }

First time doc is created

POST /upsert-index/_doc?pipeline=upsert-doc-pipeline { "full_name": "John Doe", "person_id": "1234", "age": 31 }

It should update the doc

POST /upsert-index/_doc?pipeline=upsert-doc-pipeline { "full_name": "John Doe", "person_id": "1234", "age": 32 }

elasticsearchmachine commented 1 week ago

Pinging @elastic/es-data-management (Team:Data Management)