elasticsearch-net
elasticsearch-net copied to clipboard
8.15.6 - ExtendedBounds -> ExtendedBoundsDate needs implicit convertors for anchored DateTime
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