0
我这上Elasticsearch 1.x
工作正常,但由于bool filter上2.x
(我得到doc_count: 0
)不起作用下面的查询已被弃用。我不清楚如何使用新的Bool Query来重写这个查询。Elasticsearch聚集使用布尔过滤
{
"aggregations": {
"events_per_period": {
"filter": {
"bool": {
"must": [
{
"terms": {
"message.facility": [
"facility1",
"facility2",
"facility3"
]
}
}
]
}
}
}
},
"size": 0
}
任何帮助,非常感谢。
你以前的查询是什么? –
@AndreiStefan - 我上面的查询是我在1.x中返回'doc_count> 0'的一个,但是在2.x中返回0。 – jeffreyveon
您还可以分享'message'字段和示例文档的映射吗? –