Update type of a field mapping

It seems it's not possible to change the mapping of a field after it's
creation. Will this be fixed in the future?

I have tried the following on an existing index/type:

curl -XPOST http://localhost:9200/index/type/_mapping -d '{
"type": {
"properties": {
"field": { "type": "integer" }
}
}
}'

What is the best practice when it comes to changing the mapping of an
index? Some indexes might take days to build and it's not really
feasible to drop the complete index, fix the mapping, then index again.

I don't think that it can be done.
Especially if you don't store the source.

Once your field is tokenized you can't tokenize it again in a different way.

My 2 cents.

David :wink:
Twitter : @dadoonet / @elasticsearchfr

Le 25 mai 2012 à 12:42, Christer edvartsen.christer@gmail.com a écrit :

It seems it's not possible to change the mapping of a field after it's
creation. Will this be fixed in the future?

I have tried the following on an existing index/type:

curl -XPOST http://localhost:9200/index/type/_mapping -d '{
"type": {
"properties": {
"field": { "type": "integer" }
}
}
}'

What is the best practice when it comes to changing the mapping of an
index? Some indexes might take days to build and it's not really
feasible to drop the complete index, fix the mapping, then index again.