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