Hi,
The following template mapping
curl -XPUT http://localhost:9200/template/service_01 -d '{
"template" : "service*",
"order": 1,
"settings" : {
"index.cache.field.type" : "soft",
"index.refresh_interval" : "5s",
"index.store.compress.stored" : true,
"mapping.allow_type_wrapper": true
},
"mappings" : {
"_default" : {
"_all" : {"enabled" : false},
"_timestamp" : {"enabled" : true,"path" : "0STARTTIMESTAMP","format" : "YYYY/MM/dd HH:mm:ss"},
"properties" : {
"0STARTTIMESTAMP": {
"type": "date",
"format": "YYYY/MM/dd HH:mm:ss"
},
"STOPTIMESTAMP": {
"type": "date",
"format": "YYYY/MM/dd HH:mm:ss"
}
}
}
}
}'
Works great in ES 1.4.4. For the below data.
{"index":{"_index":"service_sapstats","_type":"mytype"}}
{"0STARTTIMESTAMP":"2015/02/13 13:00:00","*STOPTIMESTAMP":"2015/02/13 13:15:00","data":"somedata"}
But in ES 2.0.0 it throws the below exceptions.
{"index":{"index":"service_sapstats","_type":"SAM","_id":null,"status":400,"error":{"type":"mapper_parsing_exception","reason":"mapping [_default]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [_timestamp] has unsupported parameters: [path : 0STARTTIMESTAMP]"}}
in ES 2.0.0