# How to update static index mappings

**URL:** <https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034>\
**Category:** Elasticsearch\
**Created:** [December 1, 2011, 3:12am UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034 "2011-12-01T03:12:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)\
**Post date:** [December 1, 2011, 3:12am UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034/1 "2011-12-01T03:12:13Z")

</div>

I have two mappings mapping1.json and mapping2.json for my index  
placed under config/mappings/index/.

As product requirement, i need to update the two mappings without stop  
search service. I tried replace them with new mappings, but through  
elasticsearch-head console, I see nothing changed for the mappings.

I looked through the user guide on [elasticsearch.org](http://elasticsearch.org) but found nothing  
to do this work.

---

<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:** [December 1, 2011, 6:12am UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034/2 "2011-12-01T06:12:24Z")

</div>

You can not.  
You can only try to merge mappings with a curl command (or using Java API)

Mapping files are only read when ES starts.  
BTW, when you have many nodes, it's easier to send only one curl command instead of copying mapping files on each node.

David 😉  
@dadoonet

Le 1 déc. 2011 à 04:12, Weiwei Wang [ww.wang.cs@gmail.com](mailto:ww.wang.cs@gmail.com) a écrit :

> I have two mappings mapping1.json and mapping2.json for my index  
> placed under config/mappings/index/.
> 
> As product requirement, i need to update the two mappings without stop  
> search service. I tried replace them with new mappings, but through  
> elasticsearch-head console, I see nothing changed for the mappings.
> 
> I looked through the user guide on [elasticsearch.org](http://elasticsearch.org) but found nothing  
> to do this work.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 1, 2011, 4:11pm UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034/3 "2011-12-01T16:11:39Z")

</div>

You want to update the mappings of an existing index? The files there are  
no longer relevant in this case. You can update mappings (mainly to  
introduce new internal mapping definitions) using the put mapping API.

On Thu, Dec 1, 2011 at 5:12 AM, Weiwei Wang [ww.wang.cs@gmail.com](mailto:ww.wang.cs@gmail.com) wrote:

> I have two mappings mapping1.json and mapping2.json for my index  
> placed under config/mappings/index/.
> 
> As product requirement, i need to update the two mappings without stop  
> search service. I tried replace them with new mappings, but through  
> elasticsearch-head console, I see nothing changed for the mappings.
> 
> I looked through the user guide on [elasticsearch.org](http://elasticsearch.org) but found nothing  
> to do this work.

---

<div class="post-metadata">

**Author:** ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)\
**Post date:** [December 2, 2011, 4:25am UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034/4 "2011-12-02T04:25:09Z")

</div>

I want to change the mapping for some of the fields, I tried the put  
mapping api, confict occurs no matter i change type/analyzer/store.

On Dec 2, 12:11 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> You want to update the mappings of an existing index? The files there are  
> no longer relevant in this case. You can update mappings (mainly to  
> introduce new internal mapping definitions) using the put mapping API.
> 
> On Thu, Dec 1, 2011 at 5:12 AM, Weiwei Wang [ww.wang...@gmail.com](mailto:ww.wang...@gmail.com) wrote:
> 
> > I have two mappings mapping1.json and mapping2.json for my index  
> > placed under config/mappings/index/.
> 
> > As product requirement, i need to update the two mappings without stop  
> > search service. I tried replace them with new mappings, but through  
> > elasticsearch-head console, I see nothing changed for the mappings.
> 
> > I looked through the user guide on [elasticsearch.org](http://elasticsearch.org) but found nothing  
> > to do this work.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 4, 2011, 2:04pm UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034/5 "2011-12-04T14:04:29Z")

</div>

You can't change the mapping definition for existing fields (for example,  
something like its type).

On Fri, Dec 2, 2011 at 6:25 AM, Weiwei Wang [ww.wang.cs@gmail.com](mailto:ww.wang.cs@gmail.com) wrote:

> I want to change the mapping for some of the fields, I tried the put  
> mapping api, confict occurs no matter i change type/analyzer/store.
> 
> On Dec 2, 12:11 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > You want to update the mappings of an existing index? The files there are  
> > no longer relevant in this case. You can update mappings (mainly to  
> > introduce new internal mapping definitions) using the put mapping API.
> > 
> > On Thu, Dec 1, 2011 at 5:12 AM, Weiwei Wang [ww.wang...@gmail.com](mailto:ww.wang...@gmail.com)  
> > wrote:
> > 
> > > I have two mappings mapping1.json and mapping2.json for my index  
> > > placed under config/mappings/index/.
> > 
> > > As product requirement, i need to update the two mappings without stop  
> > > search service. I tried replace them with new mappings, but through  
> > > elasticsearch-head console, I see nothing changed for the mappings.
> > 
> > > I looked through the user guide on [elasticsearch.org](http://elasticsearch.org) but found nothing  
> > > to do this work.

---

<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:46am UTC](https://discuss.elastic.co/t/how-to-update-static-index-mappings/6034/6 "2017-07-06T03:46:30Z")

</div>


