Cannot index document whose date value is equivalent to Java's OffsetDateTime.MIN #81042
Labels
>enhancement
:Search/Mapping
Index mappings, including merging and defining field types
Team:Search
Meta label for search team
Elasticsearch version (
bin/elasticsearch --version
): Version: 7.10.2, Build: oss/docker/747e1cc71def077253878a59143c1f785afa92b9/2021-01-13T00:42:12.435326Z, JVM: 15.0.1Plugins installed: []
JVM version (
java -version
): openjdk 11.0.13 2021-10-19 <- that's the java version on my machine not in the docker containerOS version (
uname -a
if on a Unix-like system): Linux, Fedora 34Description of the problem including expected versus actual behavior:
It appears as though elasticsearch cannot index a date whose value is equivalent to
OffsetDateTime.MIN
. When I try to index a document with such a date field, I get a 400 response with anarithmetic_exception
(full response in steps below).The date String
-999999999-01-01T00:00:00+18:00
comes from a Java snippet like this:Steps to reproduce:
Please include a minimal but complete recreation of the problem,
including (e.g.) index creation, mappings, settings, query etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.
docker run -p 9200:9200 -p 9300:9300 -e discovery.type=single-node docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
PUT
tohttp://localhost:9200/testing-date
with JSON bodyResponse:
OffsetDateTime.MIN
,POST
tohttp://localhost:9200/testing-date/_doc
with JSON body:Response:
Provide logs (if relevant):
Please let me know if you require any additional information from me.
The text was updated successfully, but these errors were encountered: