Hello there,
I am trying to send a date in the format 2020-10-29T05:36:06.143Z[UTC]
. My mapping looks like this:
"timeStamp": {
"type": "date"
}
And I am getting the following error:
Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [createdTimeStamp] of type [date] in document with id 'testId'.
Preview of field's value:
'{offset={totalSeconds=0, rules={fixedOffset=true, transitionRules=[], transitions=[]}, id=Z}, year=2020, dayOfYear=303, nano=143000000, chronology={calendarType=iso8601, id=ISO}, minute=36, second=6, dayOfWeek=THURSDAY, month=OCTOBER, hour=5, zone={rules={fixedOffset=true, transitionRules=[], transitions=[]}, id=UTC}, dayOfMonth=29, monthValue=10}']];
nested: ElasticsearchException[Elasticsearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:72]];
I have tried:
format: "date_optional_time"
- get above error
format: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'[UTC]"
- get type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]: Invalid format: [yyyy-MM-dd'T'HH:mm:ss.SSS'Z'[UTC]]: Unknown pattern letter: U]
Any other tips on how I can get this mapping to work? It's curious because I have another application that sends dates in the exact same format, transforms it to a ZonedDateTime (like I am doing), and only uses "type: date", and it works. I'm not sure what to try next, any advice is appreciated!