NEED TO DO THIS THOROUGH LOGSTASH ONLY
'''
index => "test-voq-local"
script_type => "inline"
document_id => "%{[i_odino]}"
scripted_upsert => true
action => "update"
script => "ctx._source.record.add(params.data); params : { data : {'name' : %{[name]}; 'ts' : %{[ts]}}}"
script_lang => "painless"
Wanted to add name and time stamp object to exisitng array record.
so that output would be.
i_odino:1 #already stored data
state: DL # already stored data
record: [ # data would be added in this array as an object
{ name: "ABC", TS : " 2022-09-15T11:00:09.0000000"},
{ name: "XYZ", TS: " 2021-10-15T11:00:09.0000000"}
]
any one has any lead would be great.