Date histogram "auto" interval

Hello everyone,

I was looking through the source files on GitHub, trying to find the function that determines the automatic time interval though I could not find it.

I am working on a project, and I would like to have dynamic time intervals (e.g. large range => lower resolution, small range => higher resolution).

Does anyone know where I would be able to locate this function?



Ultimately, auto interval calculation happens here:

That module is used by the TimeBuckets class:

And the TimeBuckets class is instanciated for each date_histogram bucket aggregation here:

Hope that helps a little

This is exactly what I was looking for.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.