Hello,

I'm interested in using the EsOutputFormat class in a hadoop mapreduce 
task. 
During experimentation I have noticed that there is no direct handling for 
'date' objects. 
My data contains a number of 'date' fields which must be transposed into 
the Elasticsearch index, however, I am currently unable to successfully 
transpose those fields which should be of type 'date' as instead they are 
simple submitted into the index as 'string' type.
Using templates, I have tried to define a dynamic_date_formats as well as 
explicitly specifying a date type and format mapping for a matched field in 
a dynamic template which matches against the name of those fields which 
should be 'date' types. 
In either case, data fields indexed into my Elasticsearch cluster which 
should be recognized as 'date' types are only set as strings . 

Here is an example template similar to that with which I have been 
experimenting.
 
{
    "template" : "index-name-*",
    "mappings" : {
      "_default_" : {
        "dynamic_date_formats" : ["yyyy-MM-dd hh:mm"]
        "dynamic_templates" : [
         { "date_field_template": {
               "match":              "date_*",
               "mapping": {
                    "type":           "date",
                    "format" : ""yyyy-MM-dd hh:mm""
               }
          }
      }
}

Any help on this issue would be greatly appreciated. 
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/10ff4422-ccdb-4fc0-8ccb-34b4b5e5180a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to