How to carry parameters in logstash es script

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?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.