# Updating existing field mapping to multi\_field fails

**URL:** <https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330>\
**Category:** Elasticsearch\
**Created:** [September 13, 2010, 4:44pm UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330 "2010-09-13T16:44:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbenson](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@dbenson](https://discuss.elastic.co/u/dbenson)\
**Post date:** [September 13, 2010, 4:44pm UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/1 "2010-09-13T16:44:55Z")

</div>

I have an index with an existing field:

curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
{ "properties" : {"title" : {"type" : "string","analyzer" :  
"my\_tokenizer","omit\_norms" : true}}}}}'

When I change this field to be a multi\_field, I get an error, but the  
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
{ "properties" : { "title" : {"type" : "multi\_field","fields" :  
{"title" : {"type" : "string","analyzer" :  
"my\_tokenizer","omit\_norms" : true},"sortable" : {"type" :  
"string","analyzer" : "sortable\_tokenizer","omit\_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi\_field  
mapping [title] with a multi\_field mapping [title]]}"

Thanks,

David

---

<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:** [September 13, 2010, 10:12pm UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/2 "2010-09-13T22:12:32Z")

</div>

Hi,

Yep, thats a bug:  
[Mapper: Upgrading a simple mapping to multi\_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/369). Pushed a fix  
for it. For now, you can set the ignore\_conflicts flag to true and it will  
work correctly (though its really not a conflict).

-shay.banon

On Mon, Sep 13, 2010 at 6:44 PM, dbenson [dbenson@dbenson.net](mailto:dbenson@dbenson.net) wrote:

> I have an index with an existing field:
> 
> curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> { "properties" : {"title" : {"type" : "string","analyzer" :  
> "my\_tokenizer","omit\_norms" : true}}}}}'
> 
> When I change this field to be a multi\_field, I get an error, but the  
> docs lead me to believe I should be able to do this. Suggestions?
> 
> curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> { "properties" : { "title" : {"type" : "multi\_field","fields" :  
> {"title" : {"type" : "string","analyzer" :  
> "my\_tokenizer","omit\_norms" : true},"sortable" : {"type" :  
> "string","analyzer" : "sortable\_tokenizer","omit\_norms" : true}}}}}}'
> 
> "error":"Merge failed with failures {[Can't merge a non multi\_field  
> mapping [title] with a multi\_field mapping [title]]}"
> 
> Thanks,
> 
> David

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [September 13, 2010, 11:56pm UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/3 "2010-09-13T23:56:54Z")

</div>

Awesome, thanks for the quick fix.

Is it safe to assume that ignore\_conflicts = true is a temporary  
workaround?

Best Regards,  
Paul

On Sep 13, 4:12 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Hi,
> 
> Yep, thats a bug:[Mapper: Upgrading a simple mapping to multi\_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/369). Pushed a fix  
> for it. For now, you can set the ignore\_conflicts flag to true and it will  
> work correctly (though its really not a conflict).
> 
> -shay.banon
> 
> On Mon, Sep 13, 2010 at 6:44 PM, dbenson [dben...@dbenson.net](mailto:dben...@dbenson.net) wrote:
> 
> > I have an index with an existing field:
> 
> > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> > { "properties" : {"title" : {"type" : "string","analyzer" :  
> > "my\_tokenizer","omit\_norms" : true}}}}}'
> 
> > When I change this field to be a multi\_field, I get an error, but the  
> > docs lead me to believe I should be able to do this. Suggestions?
> 
> > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> > { "properties" : { "title" : {"type" : "multi\_field","fields" :  
> > {"title" : {"type" : "string","analyzer" :  
> > "my\_tokenizer","omit\_norms" : true},"sortable" : {"type" :  
> > "string","analyzer" : "sortable\_tokenizer","omit\_norms" : true}}}}}}'
> 
> > "error":"Merge failed with failures {[Can't merge a non multi\_field  
> > mapping [title] with a multi\_field mapping [title]]}"
> 
> > Thanks,
> 
> > David

---

<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:** [September 14, 2010, 12:00am UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/4 "2010-09-14T00:00:15Z")

</div>

Yep. In 0.10 I have improved the merge conflict resolution a lot, so most  
times, if there is a conflict, then its because there is actually one (well,  
except for that bug... 😉 )

On Tue, Sep 14, 2010 at 1:56 AM, Paul [ppearcy@gmail.com](mailto:ppearcy@gmail.com) wrote:

> Awesome, thanks for the quick fix.
> 
> Is it safe to assume that ignore\_conflicts = true is a temporary  
> workaround?
> 
> Best Regards,  
> Paul
> 
> On Sep 13, 4:12 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > Hi,
> > 
> > Yep, thats a bug:  
> > [Mapper: Upgrading a simple mapping to multi\_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/369). Pushed a  
> > fix  
> > for it. For now, you can set the ignore\_conflicts flag to true and it  
> > will  
> > work correctly (though its really not a conflict).
> > 
> > -shay.banon
> > 
> > On Mon, Sep 13, 2010 at 6:44 PM, dbenson [dben...@dbenson.net](mailto:dben...@dbenson.net) wrote:
> > 
> > > I have an index with an existing field:
> > 
> > > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> > > { "properties" : {"title" : {"type" : "string","analyzer" :  
> > > "my\_tokenizer","omit\_norms" : true}}}}}'
> > 
> > > When I change this field to be a multi\_field, I get an error, but the  
> > > docs lead me to believe I should be able to do this. Suggestions?
> > 
> > > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> > > { "properties" : { "title" : {"type" : "multi\_field","fields" :  
> > > {"title" : {"type" : "string","analyzer" :  
> > > "my\_tokenizer","omit\_norms" : true},"sortable" : {"type" :  
> > > "string","analyzer" : "sortable\_tokenizer","omit\_norms" : true}}}}}}'
> > 
> > > "error":"Merge failed with failures {[Can't merge a non multi\_field  
> > > mapping [title] with a multi\_field mapping [title]]}"
> > 
> > > Thanks,
> > 
> > > David

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [September 14, 2010, 12:01am UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/5 "2010-09-14T00:01:02Z")

</div>

Actually, I think I follow.

The workaround on 0.10.0 is to set ignore\_conflicts to true.

With this fix that won't be necessary, correct?

Thanks,  
Paul

On Sep 13, 5:56 pm, Paul [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:

> Awesome, thanks for the quick fix.
> 
> Is it safe to assume that ignore\_conflicts = true is a temporary  
> workaround?
> 
> Best Regards,  
> Paul
> 
> On Sep 13, 4:12 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > Hi,
> 
> > Yep, thats a bug:[Mapper: Upgrading a simple mapping to multi\_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/369). Pushed a fix  
> > for it. For now, you can set the ignore\_conflicts flag to true and it will  
> > work correctly (though its really not a conflict).
> 
> > -shay.banon
> 
> > On Mon, Sep 13, 2010 at 6:44 PM, dbenson [dben...@dbenson.net](mailto:dben...@dbenson.net) wrote:
> > 
> > > I have an index with an existing field:
> 
> > > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> > > { "properties" : {"title" : {"type" : "string","analyzer" :  
> > > "my\_tokenizer","omit\_norms" : true}}}}}'
> 
> > > When I change this field to be a multi\_field, I get an error, but the  
> > > docs lead me to believe I should be able to do this. Suggestions?
> 
> > > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia" :  
> > > { "properties" : { "title" : {"type" : "multi\_field","fields" :  
> > > {"title" : {"type" : "string","analyzer" :  
> > > "my\_tokenizer","omit\_norms" : true},"sortable" : {"type" :  
> > > "string","analyzer" : "sortable\_tokenizer","omit\_norms" : true}}}}}}'
> 
> > > "error":"Merge failed with failures {[Can't merge a non multi\_field  
> > > mapping [title] with a multi\_field mapping [title]]}"
> 
> > > Thanks,
> 
> > > David

---

<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:** [September 14, 2010, 12:01am UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/6 "2010-09-14T00:01:33Z")

</div>

Yep.

On Tue, Sep 14, 2010 at 2:01 AM, Paul [ppearcy@gmail.com](mailto:ppearcy@gmail.com) wrote:

> Actually, I think I follow.
> 
> The workaround on 0.10.0 is to set ignore\_conflicts to true.
> 
> With this fix that won't be necessary, correct?
> 
> Thanks,  
> Paul
> 
> On Sep 13, 5:56 pm, Paul [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:
> 
> > Awesome, thanks for the quick fix.
> > 
> > Is it safe to assume that ignore\_conflicts = true is a temporary  
> > workaround?
> > 
> > Best Regards,  
> > Paul
> > 
> > On Sep 13, 4:12 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > 
> > > Hi,
> > 
> > > Yep, thats a bug:  
> > > [Mapper: Upgrading a simple mapping to multi\_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/369). Pushed a  
> > > fix  
> > > for it. For now, you can set the ignore\_conflicts flag to true and it  
> > > will  
> > > work correctly (though its really not a conflict).
> > 
> > > -shay.banon
> > 
> > > On Mon, Sep 13, 2010 at 6:44 PM, dbenson [dben...@dbenson.net](mailto:dben...@dbenson.net) wrote:
> > > 
> > > > I have an index with an existing field:
> > 
> > > > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia"  
> > > > :  
> > > > { "properties" : {"title" : {"type" : "string","analyzer" :  
> > > > "my\_tokenizer","omit\_norms" : true}}}}}'
> > 
> > > > When I change this field to be a multi\_field, I get an error, but the  
> > > > docs lead me to believe I should be able to do this. Suggestions?
> > 
> > > > curl -XPUT "[http://dm-adsearchd102:9201/bia/bia/\_mapping](http://dm-adsearchd102:9201/bia/bia/_mapping)" -d '{"bia"  
> > > > :  
> > > > { "properties" : { "title" : {"type" : "multi\_field","fields" :  
> > > > {"title" : {"type" : "string","analyzer" :  
> > > > "my\_tokenizer","omit\_norms" : true},"sortable" : {"type" :  
> > > > "string","analyzer" : "sortable\_tokenizer","omit\_norms" : true}}}}}}'
> > 
> > > > "error":"Merge failed with failures {[Can't merge a non multi\_field  
> > > > mapping [title] with a multi\_field mapping [title]]}"
> > 
> > > > Thanks,
> > 
> > > > David

---

<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, 4:19am UTC](https://discuss.elastic.co/t/updating-existing-field-mapping-to-multi-field-fails/3330/7 "2017-07-06T04:19:20Z")

</div>


