Logstash date parsing error ( date field doesn't have any time)

down vote
My data has date in the format yyyy-MM-dd ex : "2015-10-12"

My logstash date filter is as below

date {
match => ["start_date", "yyyy-MM-dd"]
target => "start_date"
However, my es instance is not able to parse it and I'm getting following error

"error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [study.startDate]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: "2012-04-17T00:00:00.000Z" is malformed at "T00:00:00.000Z""}}}}

What's the mapping of the field in ES?

"startDate": {
"type": "date",
"format": "yyyy-MM-dd"

I guess you can't stuff "2012-04-17T00:00:00.000Z" into a field that accepts a yyyy-MM-dd date format. I suppose ES in this case autodetected the previous field value (containing just the date) as a yyyy-MM-dd date. Mappings can't be changed without reindexing so if possible the easiest way out would be to just delete the index and start over.

@magnusbaeck deleting the old template file and re-processing worked, Thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.