查看33账号follow_status不存在的用户信息列表
curl -X POST "localhost:9200/*/wechat_customer/_search"
{
"_source": ["nickname", "openid", "follow_status"],
"query": {
"filtered": {
"filter": {
"bool": {
"must": [{
"term": {
"mid": "33"
}
}],
"must_not": [{
"nested": {
"path": "follow_status",
"query": {
"filtered": {
"filter": {
"exists": {
"field": "follow_status.start_intdate"
}
}
}
}
}
}]
}
}
}
}
}
2、获取主文档和子文档的字段,has_child 和 inner_hits
{
"_source":["id","openid","nickname","headimgurl","city","province","country","subscribe_time","action_count","source_type","source_value"],
"query": {
"filtered": {
"filter": {
"bool": {
"must": [ {
"term": {
"mid": "33"
}
},{
"term": {
"source_channel_id": "0"
}
},{
"has_child": {
"type":"user_action_record_others",
"inner_hits":{
"sort":{"create_time":{"order":"desc"}},
"_source":["create_time"],
"size":1
},
"query": {
"filtered": {
"filter": {
"bool": {
"must": [ {
"term": {
"wid": "33"
}
},{
"term": {
"type": "qrcode_scan"
}
},{
"term": {
"keyword": "9173"
}
}]
}
}
}
}
}
}]
}
}
}
}
}