opensearch-project / opensearch-java

Java Client for OpenSearch
Apache License 2.0
124 stars 183 forks source link

[BUG] timeZone not implemented in CompositeDateHistogramAggregationSource #1142

Open yyj1219 opened 2 months ago

yyj1219 commented 2 months ago

What is the bug?

timeZone not implemented in CompositeDateHistogramAggregationSource.

How can one reproduce the bug?

CompositeDateHistogramAggregationSource.of(cdha -> cdha
        .field("time")
        .fixedInterval(Time.of(t -> t.time("1h")))
        .timeZone("Asia/Seoul")
);

I expected timeZone(), but there is zoneId(). However, in OpenSearch 2.13, CompositeDateHistogramAggregationSource only supports time_zone and does not support zone_id.

What is the expected behavior?

Please add timeZone().

What is your host/environment?

OpenSearch 2.13 and OpenSearch Java Client 2.13

Xtansia commented 2 months ago

@yyj1219 Thanks for reporting this! Would you be interested in contributing a PR to add this? It would be very welcomed if so 😄

yyj1219 commented 2 months ago

@Xtansia Alright, I'll give it a try.