Did some more testing today.
When i do a manual query using Postman using the 2019-08-27T17:02:10.285Z
format it doesn't work with strict_date_optional_time
but does work if i use the format YYYY-MM-dd'T'HH:mm:ss.SSS'Z'
Next issue I found now is that the aggregation does something very weird.
The month, day, hour and minute values are correct but all my year values are 1970.
For example:
"aggregations": {
"usage": {
"buckets": [
{
"key_as_string": "1970-03-13T00:00:00.000Z",
"key": 6134400000,
"doc_count": 32
},
{
"key_as_string": "1970-03-21T00:00:00.000Z",
"key": 6825600000,
"doc_count": 2
},
{
"key_as_string": "1970-03-29T00:00:00.000Z",
"key": 7516800000,
"doc_count": 4
},
{
"key_as_string": "1970-04-10T00:00:00.000Z",
"key": 8553600000,
"doc_count": 2
},
{
"key_as_string": "1970-04-23T00:00:00.000Z",
"key": 9676800000,
"doc_count": 2
},
{
"key_as_string": "1970-04-25T00:00:00.000Z",
"key": 9849600000,
"doc_count": 2
},
{
"key_as_string": "1970-05-07T00:00:00.000Z",
"key": 10886400000,
"doc_count": 80
},
{
"key_as_string": "1970-05-09T00:00:00.000Z",
"key": 11059200000,
"doc_count": 2
},
{
"key_as_string": "1970-05-13T00:00:00.000Z",
"key": 11404800000,
"doc_count": 2
},
{
"key_as_string": "1970-05-14T00:00:00.000Z",
"key": 11491200000,
"doc_count": 4
},
{
"key_as_string": "1970-05-16T00:00:00.000Z",
"key": 11664000000,
"doc_count": 8
},
{
"key_as_string": "1970-05-17T00:00:00.000Z",
"key": 11750400000,
"doc_count": 4
},
{
"key_as_string": "1970-05-24T00:00:00.000Z",
"key": 12355200000,
"doc_count": 4
},
{
"key_as_string": "1970-05-28T00:00:00.000Z",
"key": 12700800000,
"doc_count": 2
},
{
"key_as_string": "1970-06-06T00:00:00.000Z",
"key": 13478400000,
"doc_count": 2
},
{
"key_as_string": "1970-06-07T00:00:00.000Z",
"key": 13564800000,
"doc_count": 2
},
{
"key_as_string": "1970-06-13T00:00:00.000Z",
"key": 14083200000,
"doc_count": 6
},
{
"key_as_string": "1970-06-14T00:00:00.000Z",
"key": 14169600000,
"doc_count": 2
},
{
"key_as_string": "1970-06-15T00:00:00.000Z",
"key": 14256000000,
"doc_count": 2
},
{
"key_as_string": "1970-06-17T00:00:00.000Z",
"key": 14428800000,
"doc_count": 8
},
{
"key_as_string": "1970-06-18T00:00:00.000Z",
"key": 14515200000,
"doc_count": 188
},
{
"key_as_string": "1970-06-19T00:00:00.000Z",
"key": 14601600000,
"doc_count": 14
},
{
"key_as_string": "1970-06-20T00:00:00.000Z",
"key": 14688000000,
"doc_count": 8
},
{
"key_as_string": "1970-06-21T00:00:00.000Z",
"key": 14774400000,
"doc_count": 4
},
{
"key_as_string": "1970-06-24T00:00:00.000Z",
"key": 15033600000,
"doc_count": 2
},
{
"key_as_string": "1970-06-27T00:00:00.000Z",
"key": 15292800000,
"doc_count": 2
},
{
"key_as_string": "1970-06-28T00:00:00.000Z",
"key": 15379200000,
"doc_count": 8
},
{
"key_as_string": "1970-06-30T00:00:00.000Z",
"key": 15552000000,
"doc_count": 2
},
{
"key_as_string": "1970-07-01T00:00:00.000Z",
"key": 15638400000,
"doc_count": 2
},
{
"key_as_string": "1970-07-08T00:00:00.000Z",
"key": 16243200000,
"doc_count": 6
},
{
"key_as_string": "1970-07-09T00:00:00.000Z",
"key": 16329600000,
"doc_count": 2
}
]
}
}
Any idea what could be causing this?