Hi all, I noticed that some dates that were correctly handled by elasticsearch version 6.5 are rejected by elasticsearch 7.2. Here is an example:
Elasticseach 7.2.0
PUT localhost:9200/my_index
{
"mappings": {
"properties": {
"date": {
"type": "date",
"format": "date_time"
}
}
}
}
This document is successfully indexed:
POST localhost:9200/my_index/_doc
{
"date": "99999-12-31T23:59:59.999+0000"
}
While this one is rejected:
POST localhost:9200/my_index/_doc
{
"date": "100000-01-01T00:00:00.000+0000"
}
The error is:
{
"error" : {
"root_cause" : [
{
"type" : "mapper_parsing_exception",
"reason" : "failed to parse field [date] of type [date] in document with id 'vp5Ms2sBNm1nVrvtzmYN'"
}
],
"type" : "mapper_parsing_exception",
"reason" : "failed to parse field [date] of type [date] in document with id 'vp5Ms2sBNm1nVrvtzmYN'",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "failed to parse date field [100000-01-01T00:00:00.000+0000] with format [date_time]",
"caused_by" : {
"type" : "date_time_parse_exception",
"reason" : "Failed to parse with all enclosed parsers"
}
}
},
"status" : 400
}
Elasticseach 6.5.4
PUT localhost:9200/my_index
{
"mappings": {
"_doc": {
"properties": {
"date": {
"type": "date",
"format": "date_time"
}
}
}
}
}
Both documents are successfully indexed:
POST localhost:9200/my_index/_doc
{
"date": "99999-12-31T23:59:59.999+0000"
}
POST localhost:9200/my_index/_doc
{
"date": "100000-01-01T00:00:00.000+0000"
}
I haven't found anything in the changelogs about this, any suggestion on how to keep the old behavior?