es查询和更新
Posted bigben0123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了es查询和更新相关的知识,希望对你有一定的参考价值。
GET /my_test*/_search
"query":
"bool":
"must": [
"term":
"root_id": 5
,
"match":
"sub_id": 0
,
"match":
"remote_address" : "69.246.123.214"
],
"must_not": [
"match": "root_name": "直播"
]
POST /my_test*/doc/_update_by_query?conflicts=proceed
"query":
"bool":
"must": [
"term":
"root_id": 5
,
"match":
"sub_id": 0
,
"match":
"remote_address": "69.246.123.214"
],
"must_not": [
"match":
"root_name": "直播"
]
,
"script":
"lang": "painless",
"source": "ctx._source.root_name = params.live_name",
"params":
"live_name": "直播"
以上是关于es查询和更新的主要内容,如果未能解决你的问题,请参考以下文章