{
\"_index\" : \"test\",
\"_type\" : \"test\",
\"_id\" : \"1212\",
\"_version\" : 5,
\"found\" : true,
\"_source\" : {
\"count\" : 42,
\"list_dat
I was getting error [UpdateRequest] unknown field [params]
as I was using the latest version of ElasticSearch (7.9.0.), seems like the syntax is changed a bit.
Following should work for newer versions of ElasticSearch:
$ curl -XPOST 'localhost:9200//_update/1212'
{
"script": {
"source": "ctx._source.list_data.removeIf(list_item -> list_item.list_id == params.remove_id);",
"params": {
"remove_id": 122
}
}
}