Make sure time intervals are calculated in ms

This commit is contained in:
allegroai 2020-03-20 10:50:56 +02:00
parent 383b2666c4
commit b48f4eb2eb

View File

@ -111,7 +111,7 @@ class TimestampKey(ScalarKey):
self.name: { self.name: {
"date_histogram": { "date_histogram": {
"field": "timestamp", "field": "timestamp",
"interval": interval, "interval": f"{interval}ms",
"min_doc_count": 1, "min_doc_count": 1,
} }
} }
@ -150,7 +150,7 @@ class ISOTimeKey(ScalarKey):
self.name: { self.name: {
"date_histogram": { "date_histogram": {
"field": "timestamp", "field": "timestamp",
"interval": interval, "interval": f"{interval}ms",
"min_doc_count": 1, "min_doc_count": 1,
"format": "strict_date_time", "format": "strict_date_time",
} }