I am using Elasticsearch 6.5.
Let say, that my Elasticsearch document looks like this:
"_source" : {
"field1" : "val1",
"field2" : "val2",
"struct1" : {
"inner_field1" : "inner val1",
"inner_field2" : "inner val2",
}
}
I would like to delete one of inner fields in this structure.
I tried following code:
POST test_idx1/_doc/1/_update
{
"script": "ctx._source.remove('struct1.inner_field1');"
}
and the result says updated
, but nothing changes.
How to perform such action?