单独查询某个字段没有值,没有附加条件
{ "query": { "bool": { "must_not": { "exists": { "field": "materielName" } } } } }
单独查询某个字段没有值,有附加条件
{ "query": { "bool": { "must": [ { "match": { "purchaserId": 1 } } ], "must_not": [ { "exists": { "field": "agentCompanyName" } } ] } } }