I'm getting Caused by: java.lang.IllegalArgumentException: failed to parse date field [Thu Jan 30 15:31:42 +00:00 2020] with format [strict_date_optional_time||epoch_millis||E M dd HH:mm:ss Z yyyy] when ingesting some data into Elasticsearch, but I can't figure out why.
I see the problematic date is Thu Jan 30 15:31:42 +00:00 2020 so I added E M dd HH:mm:ss Z yyyy as a custom date pattern. Shouldn't this pattern match the date? I haven't been able to find any good ways to test ES date pattern matching.
I recently wrote a small tool to easier play with parsing date formats. It's available at https://esddd.herokuapp.com/
I tried the above datepattern in combination with Thu Jan 30 15:31:42 +00:00 2020 as the data to check, and the parsing worked.
As you can see java dates are a bit tricky with regards to the length of those letters (E vs. EEE) as those have different meanings how to interpret the input.
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.