2
我已经interval=week
和min_doc_count=0
Elasticsearch:数周聚集min_doc_count不起作用
{
"aggs": {
"scores_by_date": {
"date_histogram": {
"field": "date",
"format": "yyyy-MM-dd",
"interval": "week",
"min_doc_count": 0
}
}
}
和日期过滤器下面聚集从Jan-01-2015
到Feb-23-2015
{
"range": {
"document.date": {
"from": "2015-01-01",
"to": "2015-02-23"
}
}
}
我预计Elasticsearch填补7周即使空和回流桶,但最终只有一个项目在它
{
"aggregations": {
"scores_by_date": {
"buckets": [
{
"key_as_string": "2015-01-05",
"key": 1420416000000,
"doc_count": 5
}
]
}
}
}
Elasticsearch version: 1.4.0
我的聚合有什么问题,或者我怎么能说Elasticsearch填补缺失的几周?
哇,这为我工作,非常感谢你 – sultan 2015-02-23 14:55:25