I need to apply a fix to the content of various documents in ES 2.1 (bug in the code we urgently need to fix).
We have ~400 M documents in ES 2.1
The following request works perfectly in ES 6:
POST messages/_update_by_query
{
"script": {
"source": "ctx._source.item.amountEuro=(Math.round(100.0*ctx._source.item.amountNational/ctx._source.item.conversionRate))/100.0",
"lang": "painless"
},
"query": {
"term": {
"country": "HR"
}
}
}
In ES 2.1, I have a type: "sdr"
Therefore, I tried running the very same request, simply adding the type as follows:
POST messages/sdr/_udpate_by_query
...
but this does not work (at least nothing is performed at the level of the documents).
What am I doing wrong?
Many thanks for your help.