Is there any way to modify the date format of the key? or provide maybe an additional key field in a format that I like for use later in Vega? Currently sorting by key_as_string but it's lengthy
{
"size": 0,
"aggs": {
"wow": {
"filter": {
"range": {
"date": {
"gte": "2020-01-01",
"lte": "2020-01-31"
}
}
},
"aggs":
{
"wow-er":
{
"date_histogram": {
"field": "date",
"interval": "month"
}
}
}
}
}
}
The above returns the following. In a perfect world I would love to just get just MMM in the key as string.
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"wow" : {
"doc_count" : 30693,
"wow-er" : {
"buckets" : [
{
"key_as_string" : "2020-01-01T00:00:00.000Z",
"key" : 1577836800000,
"doc_count" : 30693
}
]
}
}
}
}