I tried to use date histogram with specific range ,
{
"aggs": {
"group_by_created_ts": {
"range": {
"date_histogram": {
"field": "created_ts",
"interval": "day",
"format": "yyyy-MM-dd",
"ranges": [
{
"to": "2019-03-29"
},
{
"from": "2019-02-29"
}
]
}
}
}
}
}
it gives error
"type": "x_content_parse_exception",
"reason": "[5:13] [range] unknown field [date_histogram], parser not found"