Here is my index
[
{
"_index" : "ind1",
"_type" : "doc",
"_id" : "ceI6smsB5aL8Y_rB7r5N",
"_score" : 1.0,
"_source" : {
"@timestamp" : "2019-06-27T09:31:08.384Z",
"id" : 2,
"name" : "abc",
}
},
{
"_index" : "ind1",
"_type" : "doc",
"_id" : "cuI6smsB5aL8Y_rB775e",
"_score" : 1.0,
"_source" : {
"@timestamp" : "2019-06-27T09:31:08.384Z",
"id" : 1,
"name" : "xyz",
}
}
Here is my script
input{
elasticsearch {
hosts => ["localhost:9200"]
index => "ind1"
}
}
filter {
mutate {
remove_field => [ "name" ]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
action => "delete"
index => "ind1"
document_type => "doc"
document_id => "%{[@metadata][_id]}"
}}
when i run this script , i didn't find any changes in o/p
Can anyone help me with this