elasticsearch的update_by_query

批量局部更新

post
http://10.2.122.170:9200/index/type/_update_by_query/

{
   "query": {
        "bool": { 
            "filter": {
                "terms": {
                    "_id": ["AVV_u51pGC2iX1EFQSzf","AVV_u51pGC2iX1EFQezh"]
                }
            }
        }
    },
    "script": {
        "inline":"ctx._source.updateTime = 1467907200000;ctx._source.userId='2970699'"
    }
}

参考

  • Update By Query API

你可能感兴趣的:(elasticsearch)