# Force merging

**URL:** https://discuss.elastic.co/t/force-merging/8038
**Category:** Elasticsearch
**Created:** [June 11, 2012, 8:53am UTC](https://discuss.elastic.co/t/force-merging/8038 "2012-06-11T08:53:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![grab](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@grab](https://discuss.elastic.co/u/grab)
#### Post date: [June 11, 2012, 8:53am UTC](https://discuss.elastic.co/t/force-merging/8038/1 "2012-06-11T08:53:16Z")

</div>

Hi,

When i try to index my datas elastic return this error message :  
MapperParsingException[Failed to parse [foo.strBar]]; nested:  
NumberFormatException[For input string: "6.0,3.0"];

I try to change mapping on the existing type by adding  
"foo.strBar":{"type":"string"}, and i have this following error :  
MergeMappingException[Merge failed with failures {[mapper [foo.strBar]  
of different type, current\_type [double], merged\_type [string]]}]

When i make a GET on my _mapping there's no entry for foo.strBar. I try  
to cache_/clear but not better.

Is there a way to force the mapping or change it "hotswap" without  
deleting it, like "alter table" for sql?

## --

Gabriel TESSIER

Cordialement

---

<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: [June 11, 2012, 9:06am UTC](https://discuss.elastic.co/t/force-merging/8038/2 "2012-06-11T09:06:15Z")

</div>

No. As far as I know.

David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 11 juin 2012 à 10:53, vtech [gabriel@vtech.fr](mailto:gabriel@vtech.fr) a écrit :

> Hi,
> 
> When i try to index my datas elastic return this error message : MapperParsingException[Failed to parse [foo.strBar]]; nested: NumberFormatException[For input string: "6.0,3.0"];
> 
> I try to change mapping on the existing type by adding "foo.strBar":{"type":"string"}, and i have this following error :  
> MergeMappingException[Merge failed with failures {[mapper [foo.strBar] of different type, current\_type [double], merged\_type [string]]}]
> 
> When i make a GET on my _mapping there's no entry for foo.strBar. I try to cache_/clear but not better.
> 
> Is there a way to force the mapping or change it "hotswap" without deleting it, like "alter table" for sql?
> 
> ## --
> 
> Gabriel TESSIER
> 
> Cordialement

---

<div class="post-metadata">

### Author: ![grab](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@grab](https://discuss.elastic.co/u/grab)
#### Post date: [June 11, 2012, 10:08am UTC](https://discuss.elastic.co/t/force-merging/8038/3 "2012-06-11T10:08:40Z")

</div>

Thanks! Merci.

Is there a way to set all "type" : "string" to all new fields not  
defined in mapping to "string".

--  
Gabriel TESSIER

Cordialement

Le 11/06/2012 11:06, David Pilato a Ã©crit :

> No. As far as I know.
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 11 juin 2012 Ã 10:53, vtech \<[gabriel@vtech.fr](mailto:gabriel@vtech.fr)  
> [mailto:gabriel@vtech.fr](mailto:gabriel@vtech.fr)\> a Ã©crit :
> 
> > Hi,
> > 
> > When i try to index my datas elastic return this error message :  
> > MapperParsingException[Failed to parse [foo.strBar]]; nested:  
> > NumberFormatException[For input string: "6.0,3.0"];
> > 
> > I try to change mapping on the existing type by adding  
> > "foo.strBar":{"type":"string"}, and i have this following error :  
> > MergeMappingException[Merge failed with failures {[mapper  
> > [foo.strBar] of different type, current\_type [double], merged\_type  
> > [string]]}]
> > 
> > When i make a GET on my _mapping there's no entry for foo.strBar. I  
> > try to cache_/clear but not better.
> > 
> > Is there a way to force the mapping or change it "hotswap" without  
> > deleting it, like "alter table" for sql?
> > 
> > ## --
> > 
> > Gabriel TESSIER
> > 
> > Cordialement

---

<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: [June 13, 2012, 6:02pm UTC](https://discuss.elastic.co/t/force-merging/8038/4 "2012-06-13T18:02:21Z")

</div>

You can use the dynamic\_template under the root object mapper.

On Mon, Jun 11, 2012 at 12:08 PM, vtech [gabriel@vtech.fr](mailto:gabriel@vtech.fr) wrote:

> Thanks! Merci.
> 
> Is there a way to set all "type" : "string" to all new fields not defined  
> in mapping to "string".
> 
> --  
> Gabriel TESSIER
> 
> Cordialement
> 
> Le 11/06/2012 11:06, David Pilato a écrit :
> 
> No. As far as I know.
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 11 juin 2012 à 10:53, vtech [gabriel@vtech.fr](mailto:gabriel@vtech.fr) a écrit :
> 
> Hi,
> 
> When i try to index my datas elastic return this error message :  
> MapperParsingException[Failed to parse [foo.strBar]]; nested:  
> NumberFormatException[For input string: "6.0,3.0"];
> 
> I try to change mapping on the existing type by adding  
> "foo.strBar":{"type":"string"}, and i have this following error :  
> MergeMappingException[Merge failed with failures {[mapper [foo.strBar] of  
> different type, current\_type [double], merged\_type [string]]}]
> 
> When i make a GET on my _mapping there's no entry for foo.strBar. I try to  
> cache_/clear but not better.
> 
> Is there a way to force the mapping or change it "hotswap" without  
> deleting it, like "alter table" for sql?
> 
> ## --
> 
> Gabriel TESSIER
> 
> Cordialement

---

<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:24am UTC](https://discuss.elastic.co/t/force-merging/8038/5 "2017-07-06T03:24:31Z")

</div>


