Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES 2.0.0 does not accept timestamp path and mapping. #14715

Closed
nithyanv opened this issue Nov 12, 2015 · 3 comments
Closed

ES 2.0.0 does not accept timestamp path and mapping. #14715

nithyanv opened this issue Nov 12, 2015 · 3 comments

Comments

@nithyanv
Copy link

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

@rjernst
Copy link
Member

rjernst commented Nov 13, 2015

These features were explicitly removed from 2.0. See #8143 and #6677.

@rjernst rjernst closed this as completed Nov 13, 2015
@rjernst
Copy link
Member

rjernst commented Nov 13, 2015

@nithyanv You can create your own date type field (which already supports timestamps).

@l15k4
Copy link

l15k4 commented Feb 16, 2016

@rjernst hey, do you know whether I have to re-index everything because of that : https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894

The reindexing would took 47 hours, so I'm kinda screwed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants