ES 2.0.0 does not accept timestamp path and mapping


(Nithyanand Vasudevan) #1

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


(David Pilato) #2

https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_mapping_changes.html#_literal_index_name_literal_and_literal_path_literal_removed


(system) #3