*I guess I nailed it with dynamic_date_formats and extra *
dynamic_templates http://www.elasticsearch.org/guide/en/elasticsearch/reference/current//mapping-root-object-type.html#_dynamic_date_formats
like that
curl -XPUT localhost:9200/_mapping/default -d @mappings2
cat mappings2
{
"default" : {
"dynamic_date_formats" : [ "date_optional_time", "yyyy-MM-dd
HH:mm:ss.SSSSSS" ],
"dynamic_templates" : [
{ "testdate": {
"match": "testdate*",
"mapping": {
"type": "date",
"format" : "yyyy-MM-dd HH:mm:ss.SSSSSS"
}
}},
{
"string_fields" : {
"mapping" : {
"type" : "multi_field",
"fields" : {
"raw" : {
"index" : "not_analyzed",
"ignore_above" : 256,
"type" : "string"
},
"{name}" : {
"index" : "analyzed",
"omit_norms" : true,
"type" : "string"
}
}
},
"unmatch" : "testdate*",
"match" : "*",
"match_mapping_type" : "string"
}
} ],
"properties" : {
"@version" : {
"type" : "string",
"index" : "not_analyzed"
},
"geoip" : {
"dynamic" : "true",
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
}
It should be working well after few minutes - new dynamic template was not
present for about 4-5 minutes
curl -XGET localhost:9200/_mapping/ismigolog?pretty |less
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0ec00ba9-f808-40bc-99ee-168297744ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.