Steps to reproduce:
- insert 45 000 000 documents
- run:
let res = await client.updateByQuery({ index: config.get('index'), type: config.get('type'), slices: 5, waitForCompletion: false, conflicts: "proceed", requestTimeout: 36000000, timeout: -1, body: { "query": { "bool": { "must": { "match_all": {} }, "filter": { "bool": { "must": [ { "exists": { "field": "offers" } } ] } } } }, "script": { "lang": "painless", "inline": 'for (int i = 0; i < ctx._source.offers.length; i++) {ctx._source.offers[i].price_usd = ctx._source.offers[i].price / params.toUSD[ctx._source.offers[i].code]}', "params": { "toUSD": params } } } }) - After a while the cluster status will become red
Is it possible to update all records in index?