Hello
if[sid]!="null" and [sid]!=""
{
elasticsearch
{
hosts => ["localhost:9200"]
document_id => "%{sid}"
index => "dashboard_write"
script => "if(ctx._source.appdata== null)
{
ctx._source.appdata = new ArrayList();
}
ctx._source.appdata.add(params.event.get('appdata'))"
doc_as_upsert => "true"
action => "update"
ilm_enabled => false
}
}
else
{
elasticsearch
{
hosts => ["localhost:9200"]
index => "dashboard_write"
ilm_enabled => false
}
}
}
Here Im updating Elasticsearch doc based on sid field. But this sid will be stored in a document as a fieild "authsid"
So I need a if condition like this
if [sid= authsid field in one of the document]
update that document
else
insert this as new document
I know this is complicated design, but I just wanted to know is this possible??