elasticsearch-net icon indicating copy to clipboard operation
elasticsearch-net copied to clipboard

8.15.6 - ExtendedBounds -> ExtendedBoundsDate needs implicit convertors for anchored DateTime

Open niemyjski opened this issue 5 months ago • 2 comments

Elastic.Clients.Elasticsearch version: 8.15.6

Elasticsearch version: 8.15.1

.NET runtime version: 8.x

Operating system version: Any

Description of the problem including expected versus actual behavior:

We had the following code which is somewhat straightforward to convert but the FieldDateMath type seem to have a huge gap when it comes to working with DateTimes. It's not intuitive what I should pass to new FieldDateMath().

var bounds = new ExtendedBounds<DateMath> { Minimum = start, Maximum = end}; // start and end are DateTime's
...new DateHistogramAggregation { ExtendedBounds = bounds };

Expected behavior

Should be able to quickly do a bounds using dates.

Reference: https://github.com/FoundatioFx/Foundatio.Parsers/pull/84

niemyjski avatar Sep 05 '24 21:09 niemyjski