ElasticsearchDSL icon indicating copy to clipboard operation
ElasticsearchDSL copied to clipboard

Elasticsearch 8.0 removed support for `interval` in `date_histogram` aggregation types

Open Ocramius opened this issue 3 years ago • 2 comments

See https://github.com/grafana/grafana/issues/19911

In ElasticSearch 7.2, the interval property was deprecated ( https://www.elastic.co/guide/en/elasticsearch/reference/7.2/search-aggregations-bucket-datehistogram-aggregation.html#_calendar_and_fixed_intervals ):

https://github.com/ongr-io/ElasticsearchDSL/blob/b4c3c8982bca497661139a1c2967a81f8f9bb9b6/src/Aggregation/Bucketing/DateHistogramAggregation.php#L92-L111

Either calendar_interval or fixed_interval should be used instead: https://www.elastic.co/guide/en/elasticsearch/reference/8.0/search-aggregations-bucket-datehistogram-aggregation.html#calendar_and_fixed_intervals

Ocramius avatar Mar 08 '22 12:03 Ocramius

We are maintaining a fork of this because of some compatibility problems with the original library and merged today 8.x support in it https://github.com/handcraftedinthealps/ElasticsearchDSL/pull/18/files which was provided by @hkulekci.

Maybe that commits can be merged back into this library. Still we continue maintaining the fork for our usages.

/cc @einorler

alexander-schranz avatar Mar 25 '22 21:03 alexander-schranz

@alexander-schranz thank you very much for that fork, saved the day!

malc0mn avatar Dec 19 '22 12:12 malc0mn