# "Rejecting mapping update to \[megacorp2\] as the final mapping would have more than 1 type: \[Broadcast, Inventory\]"},"status":400}

**URL:** <https://discuss.elastic.co/t/rejecting-mapping-update-to-megacorp2-as-the-final-mapping-would-have-more-than-1-type-broadcast-inventory-status-400/162543>\
**Category:** Elasticsearch\
**Created:** [December 31, 2018, 11:09pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-megacorp2-as-the-final-mapping-would-have-more-than-1-type-broadcast-inventory-status-400/162543 "2018-12-31T23:09:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Harish\_Kulkarni](https://discuss.elastic.co/u/Harish_Kulkarni)\
**Post date:** [December 31, 2018, 11:09pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-megacorp2-as-the-final-mapping-would-have-more-than-1-type-broadcast-inventory-status-400/162543/1 "2018-12-31T23:09:55Z")

</div>

I am using RestHighLevel Client 6.5.4  
I am getting below error on Client  
Caused by: org.elasticsearch.client.ResponseException: method [PUT], host [[http://127.0.0.1:9200](http://127.0.0.1:9200)], URI [/megacorp2/Broadcast/Broadcast5?timeout=1m], status line [HTTP/1.1 400 Bad Request]  
{"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"Rejecting mapping update to [megacorp2] as the final mapping would have more than 1 type: [Broadcast, Inventory]"}],"type":"illegal\_argument\_exception","reason":"Rejecting mapping update to [megacorp2] as the final mapping would have more than 1 type: [Broadcast, Inventory]"},"status":400}  
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:546)  
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:531)

On The server the error is  
[2018-12-31T14:58:09,607][DEBUG][o.e.a.b.TransportShardBulkAction] [master] [megacorp2][3] failed to execute bulk item (index) index {[megacorp2][Broadcast][Broadcast5], source[{"type":"Broadcast","parttype":"Single","broadcasttype":"WTS","part":"ibm456","description":"test","condition":"New","manufacturer":"ibm","createdById":2,"companyId":2,"companyName":"ICC Northern UK Ltd","memlevelSort":"Broker","sortableDateCreated":"2012-07-27 13:56:26","cityName":"Foster City1","stateName":"Brussels Hoofdstedelijk Gewest","countryName":"Belgium"}]}

java.lang.IllegalArgumentException: Rejecting mapping update to [megacorp2] as the final mapping would have more than 1 type: [Broadcast, Inventory]

at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:451) ~[elasticsearch-6.5.4.jar:6.5.4]

at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:399) ~[elasticsearch-6.5.4.jar:6.5.4]

---

<div class="post-metadata">

**Author:** ![Harish\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Harish\_Kulkarni](https://discuss.elastic.co/u/Harish_Kulkarni)\
**Post date:** [January 1, 2019, 2:22am UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-megacorp2-as-the-final-mapping-would-have-more-than-1-type-broadcast-inventory-status-400/162543/2 "2019-01-01T02:22:42Z")

</div>

Solved by creating a separate index for each document mapping type  
so used /broadcast/Broadcast/Broadcast5  
instead of /megacorp2/Broadcast/Broadcast5

---

<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:** [January 29, 2019, 2:22am UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-megacorp2-as-the-final-mapping-would-have-more-than-1-type-broadcast-inventory-status-400/162543/3 "2019-01-29T02:22:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
