I want to know how to accept the invalid value as a valid value, since it is a valid date value.
I'm trying to add a document that contains a date property, if this property has a time with a rounded milliseconds that results in only one digit, it causes the following error:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse field [value_at] of type [date] in document with id '1'"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [value_at] of type [date] in document with id '1'",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "failed to parse date field [2019-07-10T17:01:01.5Z] with format [strict_date_optional_time||epoch_millis]",
"caused_by": {
"type": "date_time_parse_exception",
"reason": "Failed to parse with all enclosed parsers"
}
}
},
"status": 400
}
Steps to reproduce:
PUT my_index/_doc/1
{
"value_at": "2019-07-10T17:01:01.500Z"
}
PUT my_index/_doc/1
{
"value_at": "2019-07-10T17:01:01.5Z"
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.