Es根據欄位是否存在及某個欄位為空的資料
阿新 • • 發佈:2021-10-26
# 根據條件查詢某個欄位是否存在或為空的情況 GET colordata_bbs_series/baseinfo/_search { "size": 1000, "query": { "bool": { "must_not": [ { "regexp": { "SearchBrand": { "value": ".{0,}" } } },{ "exists": { "field": "NumberofReplys" } } ], "must": [ { "term": { "ClientID": { "value": "M103801" } } }, { "term": { "realChannel": { "value": "weixin" } } }, {"range": { "CreateTime": { "gte": "2021-10-26 00:00:00", "format": "yyyy-MM-dd HH:mm:ss" } } }, { "term": { "thread": { "value": "0" } } } ] } } }