i have applied following mapping in my index
PUT prince2/
{
"mappings": {
"properties": {
"account_id": {
"type": "long"
},
"created_at": {
"type": "date"
},
"email": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
i am trying to index following document with created at as date field.
POST prince2/_doc
{
"account_id": "244108",
"email": "user794815@green.com",
"created_at": "2011-03-12 00:00:26.371 +0000 UTC",
}
i am getting the following error
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse field [created_at] of type [date] in document with id 'pDw2W24Bxhx0nqPtLV3U'. Preview of field's value: '2011-03-12 00:00:26.371 +0000 UTC'"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [created_at] of type [date] in document with id 'pDw2W24Bxhx0nqPtLV3U'. Preview of field's value: '2011-03-12 00:00:26.371 +0000 UTC'",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "failed to parse date field [2011-03-12 00:00:26.371 +0000 UTC] 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
}
am i doing something wrong here...