I'm not sure if this counts as a feature request or a bug but I've noticed a conflict within the documentation which is reflected in the functionality. I've also noticed several other threads that talk about this but they've all been closed without any kind of resolution.
When doing a range query with a date, the documentation for the format field says:
"By default, Elasticsearch uses the date format
provided in the <field>
's mapping."
However, it also says under " Numeric date range value":
"numeric values are interpreted representing milliseconds-since-the-epoch"
The result is that if my format on my date field is epoch_second and I want to do a range search, it will interpret my query term as epoch_millisecond unless I convert the search term into a string (which does work). This seems silly. Shouldn't elastic check the format on the field before assuming a numeric value is epoch_millisecond?