So one of our legacy indexes has a field with a name "inbound-value-id". I was using the Update by Query API to update some field using Painless scripting and it was working well but just for this field with special characters I am not sure how to refer it in Painless.
Below is a the script:
POST: /index_name/_update_by_query?pretty=true
{
"script": {
"source": "ctx._source.keyid = ctx._source.inbound-value-id;"
}
}
which gives me the following error:
- "type": "illegal_argument_exception",
- "reason": "Variable [value] is not defined."