I have created a file ie., testfile.painless
ctx._source.b_id=params.b_id;
and just placed the testfile.painless
file in the config/scripts folder on cluster node and then tried with _update_by_query
{
"script": {
"id": "testfile",
"params": {
"b_id": "1W"
}
},
"query": {
"bool": {
"must": [
{
"match": {
"a_core": "71"
}
},
{
"match": {
"cid": "3IM"
}
}
]
}
}
}
When I ran the update query then I received with unable to find script [testfile] in cluster state