-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed
Labels
Description
Hello,
My question is why format provided to date histogram is trying to parse min and max extended bounds with the same format? I would like to format the output of the bucket (key_as_string) to show me name of the month ("MMM" format) but I want to provide min and max extended bounds as a simple datetime with format (""yyyy-MM-dd").
Taking the example below:
{
"aggs": {
"dateHistogram": {
"date_histogram": {
"field": "transactions.registryApplication.applicationDate",
"interval": "month",
"format": "MMM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2011-01-01",
"max": "2011-12-31"
}
},
"aggs": {
"averagePrice": {
"avg": {
"field": "transactions.sellingPrice"
}
}
}
}
}
}
I'm getting this error:
[failed to parse date field [2011-01-01], tried both date format [MMM], and timestamp number]
I mean that the format for input (bounds) and output (key_as_string field in response) should be separate, or expect the input date format to be of specific format.