I have indexed a document PUT test/_doc/1
{
"counter" : 1,
"tags" : ["red"]
}
I am using script to update my content of the documents POST test/_doc/1/_update
{
"script" : {
"source": "ctx._source.tags.add(params.tag)",
"lang": "painless",
"params" : {
"tag" : "blue"
}
}
}
POST test/_doc/1/_update
{
"script" : "ctx._source.new_field = 'value_of_new_field'"
}
This two scripts are working fine individually, I want to use these two script statements in a single "_update" API. Is it possible to do this?