單獨查詢某個字段沒有值,沒有附加條件
{ "query": { "bool": { "must_not": { "exists": { "field": "materielName" } } } } }
單獨查詢某個字段沒有值,有附加條件
{ "query": { "bool": { "must": [ { "match": { "purchaserId": 1 } } ], "must_not": [ { "exists": { "field": "agentCompanyName" } } ] } } }