Date_formats not working


(Wojciech Durczyński) #1

Hello.

It seems that date_formats doesn't work as expected.
Everything is described in following gist:


Am I doing something wrong?

Regards
Wojciech Durczyński


(Shairon Toledo) #2

Hello

Have you ever checked the right formats expect by Joda date parser?

http://www.elasticsearch.org/guide/reference/mapping/date-format.html
http://joda-time.sourceforge.net/api-release/org/joda/time/format/DateTimeFormat.html

2012/2/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello.

It seems that date_formats doesn't work as expected.
Everything is described in following gist:
https://gist.github.com/1788431
Am I doing something wrong?

Regards
Wojciech Durczyński

--
[ ]'s
Shairon Toledo


(Wojciech Durczyński) #3

Of course.
And I'd like to use "basic_date_time" format. It looks like
this: yyyyMMdd’T’HHmmss.SSSZ
And I configured "basic_date_time" as a default format, what doesn't work.


(Clinton Gormley) #4

On Fri, 2012-02-10 at 02:16 -0800, Wojciech Durczyński wrote:

Hello.

It seems that date_formats doesn't work as expected.
Everything is described in following gist:
https://gist.github.com/1788431

I can confirm that this looks broken. Please open an issue
demonstrating the problem (and remove the dynamic mapping, it is still
broken without that)

ta

clint


(Wojciech Durczyński) #5

Issue created:


(Shay Banon) #6

This happens because there is a basic check to see if something is a date by looking for :, -, and / in the string before trying to parse it. Otherwise, is 20120101 a numeric number or a date? I guess we can improve that to also look for T, and if its there, try and parse.

On Friday, February 10, 2012 at 3:13 PM, Wojciech Durczyński wrote:

Issue created:
https://github.com/elasticsearch/elasticsearch/issues/1690


(system) #7