Hello all!
I'm trying to do a date_histogram along with a sum aggregation but this returns the value 0 on the sum.
Query:
{
"size": 0,
"query": {
"bool": {
"filter": {
"term": {
"articleId.keyword": "7r2KB"
}
}
}
},
"aggs": {
"total_reading_time": {
"sum": {
"field": "duration"
}
},
"dates": {
"date_histogram": {
"field": "viewDate",
"interval": "10m",
"min_doc_count": 1
},
"aggs": {
"reading_time": {
"sum": {
"field": "duration"
}
}
}
}
}
}
Somehow the sum (total_reading_time) works, yet aggregated using date_histogram (reading_time) doesn't. I'm using ES 5.3 on AWS.
Hope someone can help me out