eg.
{
"script": {
"source": "if (ctx._source.supplier.contains(params.supplier)) { ctx._source.supplier.remove(ctx._source.supplier.indexOfparams.supplier) ;ctx._source.supplier.add(params.supplier) }",
"lang": "painless",
"params": {
"supplier": {
"gysmc": "test",
"kcl": 53454
}
}
}
}
A syntax error occurred when I wrote this in script,Is there a relevant example?