# Rejecting mapping update to \[\] as the final mapping would have more than 1 type

**URL:** <https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316>\
**Category:** Elasticsearch\
**Created:** [March 16, 2018, 2:45pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316 "2018-03-16T14:45:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanisdlj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanisdlj/32/28873_2.png) [@tanisdlj](https://discuss.elastic.co/u/tanisdlj)\
**Post date:** [March 16, 2018, 2:45pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316/1 "2018-03-16T14:45:11Z")

</div>

Hi! I've just upgraded to ES6 and my ES logs started to throw this error:

```
[2018-03-16T15:31:05,759][DEBUG][o.e.a.b.TransportShardBulkAction] [logstash-2018.03.16][3] failed to execute bulk item (index) BulkShardRequest [[logstash-2018.03.16][3]] containing [index {[logstash-2018.03.16] (Lots of data here about the log)
java.lang.IllegalArgumentException: Rejecting mapping update to [logstash-2018.03.16] as the final mapping would have more than 1 type: [doc, gelf_json]
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:501) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:353) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:285) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:313) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:643) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:273) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:198) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:133) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:244) ~[elasticsearch-6.2.2.jar:6.2.2]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:207) ~[elasticsearch-6.2.2.jar:6.2.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]

```

I have Logstash 6.2.2 and Beats (winlog and filebeats) shipping to this ES.  
In Logstash I have a conf.d/10-gelf.conf as follows:

```
input {
  gelf {
    type => "gelf_json"
    port => "XXXX"
  }
}

```

Any help or idea?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![murlin99](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@murlin99](https://discuss.elastic.co/u/murlin99)\
**Post date:** [March 16, 2018, 2:53pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316/2 "2018-03-16T14:53:56Z")

</div>

This has been answered a few times. See this reply for more information

> [@Unable to create index with more that 1 type in 6.x](https://discuss.elastic.co/t/unable-to-create-index-with-more-that-1-type-in-6-x/106089/2):
>
> This is expected as per [the list of breaking changes for Elasticsearch 6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking-changes-6.0.html). You can read more about it in [this blog post](https://www.elastic.co/blog/index-type-parent-child-join-now-future-in-elasticsearch).

---

<div class="post-metadata">

**Author:** ![tanisdlj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanisdlj/32/28873_2.png) [@tanisdlj](https://discuss.elastic.co/u/tanisdlj)\
**Post date:** [March 16, 2018, 2:57pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316/3 "2018-03-16T14:57:39Z")

</div>

Hey, thanks for the reply!  
Yes, I've seen that post and that blog post, but I am in the final lines of the blog, where it says:

> I have more questions! Tell me more!  
> Step 1: don't panic 🙂  
> Step 2: please let us know on our forums

Is the `type => "gelf_json` the part that is giving me problems?  
Because as far as I know (I am no expert in ES) that sets the field "type", not the "\_type" one, right?

Thanks!

---

<div class="post-metadata">

**Author:** ![murlin99](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@murlin99](https://discuss.elastic.co/u/murlin99)\
**Post date:** [March 16, 2018, 3:05pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316/4 "2018-03-16T15:05:43Z")

</div>

Yes that is the part. This log line shows that

java.lang.IllegalArgumentException: Rejecting mapping update to [logstash-2018.03.16] as the final mapping would have more than 1 type: [doc, gelf\_json]

The logstash index already has a type doc, this is trying to assign it another type.

---

<div class="post-metadata">

**Author:** ![tanisdlj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanisdlj/32/28873_2.png) [@tanisdlj](https://discuss.elastic.co/u/tanisdlj)\
**Post date:** [March 16, 2018, 3:14pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316/5 "2018-03-16T15:14:13Z")

</div>

Then we cannot have more than one `_type` nor `type`?  
Is everything tagged as `type:doc` by default? Then what's the point of having this option?

[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-udp.html#plugins-inputs-udp-type](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-udp.html#plugins-inputs-udp-type)

Thanks!

---

<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:** [April 13, 2018, 3:14pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type/124316/6 "2018-04-13T15:14:15Z")

</div>

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