# Update type of a field mapping

**URL:** <https://discuss.elastic.co/t/update-type-of-a-field-mapping/7861>\
**Category:** Elasticsearch\
**Created:** [May 25, 2012, 10:42am UTC](https://discuss.elastic.co/t/update-type-of-a-field-mapping/7861 "2012-05-25T10:42:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christer](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@Christer](https://discuss.elastic.co/u/Christer)\
**Post date:** [May 25, 2012, 10:42am UTC](https://discuss.elastic.co/t/update-type-of-a-field-mapping/7861/1 "2012-05-25T10:42:08Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 25, 2012, 10:46am UTC](https://discuss.elastic.co/t/update-type-of-a-field-mapping/7861/2 "2012-05-25T10:46:36Z")

</div>

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 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 25 mai 2012 à 12:42, Christer [edvartsen.christer@gmail.com](mailto: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](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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:27am UTC](https://discuss.elastic.co/t/update-type-of-a-field-mapping/7861/3 "2017-07-06T03:27:07Z")

</div>


