发布汽车/_update_by_query
{
"query": {
"match_all": {}
},
"script": {
"inline": "ctx._source.addresses = [{country:'Country', countryCode : 'cr'}]",
"lang": "painless"
}
}
脚本成功运行,没有出现错误,输出如下,但没有更新。
{
"took" : 18092,
"timed_out" : false,
"total" : 400000,
"updated" : 400000,
"deleted" : 0,
"batches" : 400,
"version_conflicts" : 0,
"noops" : 0,
"retries" : {
"bulk" : 0,
"search" : 0
},
"throttled_millis" : 0,
"requests_per_second" : -1.0,
"throttled_until_millis" : 0,
"failures" : [ ]
}
谢谢