Skip to content

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

Closed
@niemyjski

Description

@niemyjski

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: FoundatioFx/Foundatio.Parsers#84

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions