查詢new特徵的使用者並去重
阿新 • • 發佈:2018-11-09
GET app_test/_search { "query": { "bool": { "must": [ { "has_parent": { "parent_type": "user_specil", "query" : { "match" : { "user_key.keyword": "new" } } } }, { "term": { "phone.keyword": "android" } } ] } }, "collapse": { "field": "userid.keyword" }, "aggs": { "diff_user": { "cardinality" : { "field": "userid.keyword" } } }, "size": 0 }