'Histogram aggregation & daylight savings

I am trying to do a histogram aggregation over 30 days with bucket_size=86400 and offset=6060hour offset for time zone. This is working great, except for when daylight savings happens in the middle of the time range.

I’ve seen this handled by using date histograms instead of plain numeric histograms. With a date histogram, I can specify a time zone.

However, my time stamps are indexed in seconds rather than milliseconds and date histograms don’t seem to work with second time stamps. I considered using a script at query time to multiply the time stamp by 1000, and that worked, but seemed meaningfully slower.

Any other options without reindexing?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source