Hi,
Mapping of the field,
"date": {
"type": "date",
"format": "epoch_second"
},
Query,
{"query": {"range": {"date": {"lt": 1602785608.0}}}}
The same query was working fine with Elasticsearch v6.3, but as soon as I upgraded it with v7.8. It's failing. After doing some research for the breaking changes, I found following,
The epoch_millis and epoch_second formatters no longer support scientific notation.
So, When I verified as below,
{"query": {"range": {"date": {"lt": 1602785608}}}}
It worked.
But the issue is with the NEST. Even though I am trying to send the epoch value as LONG, it converts in DOUBLE and generates "1602785608.0" as giving me the following error,
failed to parse date field [1.602785608E9] with format [epoch_second]
So even though I am giving value as 1602785608 it Elasticsearch get the value as 1602785608.0 and giving me above error.
Let me know If I am not clear enough or need more details.
Any help would be appreciated!
--Thanks,