elastic / search-ui

Search UI. Libraries for the fast development of modern, engaging search experiences.
https://docs.elastic.co/search-ui
Apache License 2.0
1.92k stars 368 forks source link

Support date math in date range aggregations for Facet #940

Closed kevinz93 closed 1 year ago

kevinz93 commented 1 year ago

By default, ElasticSearch seems to have a very good and dynamic support for input date math relative to now and round to the nearest time unit, but this feature is not supported by ElasticSearch connectors and the user would have to input a valid date string using custom calculations from browser. Is there any reason for that?

Here's the source code checking the type of the input for a range value, and it seems to filter out invalid date (and numbers) so that it won't be passed to the ES engine. Is that really necessary instead of having ES engine handle the errors?

https://github.com/elastic/search-ui/blob/main/packages/search-ui-elasticsearch-connector/src/handlers/search/Request.ts#L26

botelastic[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.