赞
踩
curl -X POST "localhost:9200/twitter/_update_by_query" -H 'Content-Type: application/json' -d'
{
"script": {
"source": "ctx._source.likes++",
"lang": "painless"
},
"query": {
"term": {
"user": "kimchy"
}
}
}
'
方式一: { "script": { "source": "ctx._source.xxx='xxxxx'", "lang": "painless" }, "query": { "term": { "xxxx": "xxxxx" } } } 方式二: { "script": { "source": "ctx._source['xxx']='xxxxx'", "lang": "painless" }, "query": { "term": { "xxxx": "xxxxx" } } }
以上2种 query 都会报错
报错如下:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。