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

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], 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]

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

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