Describe the bug
Dynamic mapping interprets a string with this format 1406-21 as a date field, but then it fails to index due to 21 not being a valid month.
To Reproduce
Steps to reproduce the behavior:
PUT /bug_report
POST /bugreport/_doc
{
"not_a_date": "1406-21"
}
{
"error": {
"root_cause": [
{
"type": "date_time_exception",
"reason": "date_time_exception: Invalid value for MonthOfYear (valid values 1 - 12): 21"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [not_a_date] of type [date] in document with id 'ikxsRYoBwHActdbCw803'. Preview of field's value: '1406-21'",
"caused_by": {
"type": "date_time_exception",
"reason": "date_time_exception: Invalid value for MonthOfYear (valid values 1 - 12): 21"
}
},
"status": 400
}
Expected behavior
The insert of the new document succeeds
Host/Environment (please complete the following information):
@ungeordnet I don't think anyone is working on this. Want to try to help? Start by writing a YAML REST test and then a lower level unit test that reproduces the issue?
Describe the bug Dynamic mapping interprets a string with this format 1406-21 as a date field, but then it fails to index due to 21 not being a valid month.
To Reproduce Steps to reproduce the behavior:
Expected behavior The insert of the new document succeeds
Host/Environment (please complete the following information):