Inserting epoch date throws illegal_argument_exception #99486
Labels
>bug
:Search Foundations/Mapping
Index mappings, including merging and defining field types
Team:Search Foundations
Meta label for the Search Foundations team in Elasticsearch
Elasticsearch Version
7.17.5
Installed Plugins
No response
Java Version
openjdk version "18.0.1.1" 2022-04-22
OS Version
Linux 49997dcae70d 6.2.0-32-generic #32~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 18 10:40:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
I cannot understand why there are some epochs that fail to insert into elastic. However, if I execute `new Node(<epoch_milis_that_fails_in_es>) It returns a valid date. I first thought that it was because of the milliseconds becaus, for some reason, the date -5101599088102 fails to insert, but neither -5101599088000 or -5101599089000 fails. However, I tried other dates with milliseconds and they are accepted.
Anyone knows the reason why or if it is a bug?
Steps to Reproduce
create an index, for example an index with name 'test__v1' with the following body
Then try inserting the date -5101599088102:
This will throw the following error:
Now try inserting the date -5101599088000:
Finally if I insert a date with milliseconds
It returns okay:
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: