How to change the default date format?

Now date format can be specified by mapping for specified type. Documents said "The parsing of dates uses Joda. The default date parsing used if no format is specified is ISODateTimeFormat.dateOptionalTimeParser.".

How to change the default date format globally, not type specified?

If you refer to automatically identifying strings as dates, and which format
to use, then, on a per type basis, you can use the dateFormats option,
explained here:
http://www.elasticsearch.com/docs/elasticsearch/mapping/object_type/#dateFormats.
This, of course, can be applied on the root level object mapping (
http://www.elasticsearch.com/docs/elasticsearch/mapping/root_object_type/).

If you want to change the format of dates for types that are automatically
introduced, then you can change the dynamic mappings explained here:
http://www.elasticsearch.com/docs/elasticsearch/mapping/dynamic_mapping/. I
have just added this section to the mapping area (it used to be documented
under the mapper module).

-shay.banon

On Fri, Apr 2, 2010 at 10:25 PM, HubertChang huixiu@gmail.com wrote:

Now date format can be specified by mapping for specified type. Documents
said "The parsing of dates uses Joda. The default date parsing used if no
format is specified is ISODateTimeFormat.dateOptionalTimeParser.".

How to change the default date format globally, not type specified?

View this message in context:
http://n3.nabble.com/How-to-change-the-default-date-format-tp693607p693607.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

It's dynamic mapping.

Thanks.