1 year ago

#378489

test-img

Manuel F

Elastic/Opensearch: HowTo create a new document from an _ingest/pipeline

I am working with Elastic/Opensearch and want to create a new document in a different index out of an _ingest/pipeline I found no help in the www...

All my documents (filebeat) get parsed and modified in the beginning by a pipline, lets say "StartPipeline". Triggered by an information in a field of the incoming document, lets say "Start", I want to store that value in a special way by creating a new document in a different long-termindex - with some more information from the triggering document.

If found possibilities, how to do this manually from the console (update_by_query / reindex / painlesscripts) but it has to be triggered by an incoming document...

Perhaps this is easier to understand - in my head it looks like something like that.

PUT _ingest/pipeline/StartPipeline
{
  "description" : "create a document in/to a different index",
  "processors" : [ {
      "PutNewDoc" : {
        "if": "ctx.FieldThatTriggers== 'start'",
        "index": "DestinationIndex",
        "_id": "123",
        "document": { "message":"",
                      "script":"start", 
                      "server":"alpha
                      ...}
      }
  } ]
}

Does anyone has an idea? And sorry, I am no native speaker, I am from Germany

elasticsearch

pipeline

document

new-operator

opensearch

0 Answers

Your Answer

Accepted video resources