_id mapping path issues

Hi all,
I am trying out the _id mapping path feature, described here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-id-field.html

It works well, though I think I've noticed a limitation (or bug). In my
project, we allow mappings to be changed over time. The problem I'm seeing
is that the _id path doesn't seem to change once it is created. I cannot
change or remove it. Further, elasticsearch does not return an error when
I attempt this. A couple of thoughts: (1) if this is a legitimate
limitation, then please note this on the reference page I mentioned above,
and (2) when a user attempts this, elastic should return an error (with
readable description) rather than returning a success code & message. Even
better would be to enable this feature, and allow the path to be updated.
Perhaps that's a feature request, not a bug?

I searched the issues on github and in this group, and didn't see this
limitation mentioned. If anyone could shed some light, please let me
know. Perhaps I'm not using it correctly.

Here are the steps to demonstrate. I've tried this on 1.3.1 and 1.3.4.

curl -XDELETE localhost:9200/index1

curl -XPUT localhost:9200/index1

curl -XPOST localhost:9200/index1/tweet/_mapping -d '
{
"tweet" : {
"dynamic": "strict",
"properties" : {
"message" : {"type" : "string" }
},
"_id": {
"path": "post_id"
}
}
}'

curl -XGET localhost:9200/index1/tweet/_mapping?pretty

curl -XPOST localhost:9200/index1/tweet/_mapping -d '
{
"tweet" : {
"dynamic": "strict",
"properties" : {
"message" : {"type" : "string" }
},
"_id": {
"path": "changed"
}
}
}'

curl -XGET localhost:9200/index1/tweet/_mapping?pretty

The 2nd POST returns "acknowledged": true even though the change of the
_id path was not actually effective. You can verify this by observing the
2nd GET, i.e., it will still return "path": "post_id" .

Note that the use of "dynamic":"strict" does not seem to change the outcome.

Thanks for your help!
-Ryan

--
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/9b795608-f1dd-45ab-8177-c9dbb1df200b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.