找到问题的解决办法了么?

关于terms query查询的怪异问题

Elasticsearch | 作者 ReliefZk | 发布于2016年01月16日 | 阅读数:6413

查询是这样的:
{
"query" : {
"bool" : {
"must" : [ {
"missing" : {
"field" : "province"
}
}, {
"missing" : {
"field" : "sale_staff"
}
} ]
}
},
"post_filter" : {
"bool" : {
"must" : [ {
"range" : {
"gmt_date" : {
"from" : "20160101",
"to" : "20160101",
"include_lower" : true,
"include_upper" : true
}
}
}, {
"terms" : {
"product_type" : [ "A", "B" ],
"_name" : "product_type"
}
} ]
}
},
"sort" : [ {
"gmt_date" : {
"order" : "asc"
}
} ]
}

 
数据是这样的:

QQ20160116-0.png

 
对应的数据是肯定有的 但查询不出来数据  
 
but, 这样的用法在其他index-type就可以查询到  求指导
已邀请:

medcl - 今晚打老虎。

赞同来自: zttech

   "must" : [ {
"missing" : {
"field" : "province"
}
}, {
"missing" : {
"field" : "sale_staff"
}
}
这个条件是干嘛的?你的数据不符合这个条件

要回复问题请先登录注册