一. 指定多条件
POST es_index/_update_by_query
{
"script": {
"source": "ctx._source['salary']=1"
},
"query": {
"bool": {
"must": [
{
"term": {
"name": "zhangsan"
}
},
{
"term": {
"age": 4
}
},
{
"term": {
"sex": "man"
}
}
]
}
}
}
二.指定单条件
POST es_index/_doc/_id/_update
{
"doc": {
"filed_special": 4
}
}