Enonic : 6.6.0
OS: Windows
I am struggling with Aggregation on datefields
field: “createdTime” (code below)
works
field: “data.reportedDate”
does not works even if the the date format is exactly the same.
Aggregation on fields under data in case of “terms” seems to work fine. Is there any reason this should not work for dates?
aggregations: {
by_month: {
"dateHistogram": {
field: "createdTime",
interval: "month",
minDocCount: 0,
format: "MM-yyyy"
},
aggregations: {
"categories": {
"terms": {
field: "data.productcategory"
}
}
}
}
}