How to update static index mappings

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 but found nothing
to do this work.

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 :wink:
@dadoonet

Le 1 déc. 2011 à 04:12, Weiwei Wang 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 but found nothing
to do this work.

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 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 but found nothing
to do this work.

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 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 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 but found nothing
to do this work.

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 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 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
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 but found nothing
to do this work.