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": "直播"
}
}
}