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

**URL:** <https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985>\
**Category:** Logstash\
**Created:** [June 14, 2018, 6:52pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985 "2018-06-14T18:52:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmongit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmongit/32/31968_2.png) [@dmongit](https://discuss.elastic.co/u/dmongit)\
**Post date:** [June 14, 2018, 6:52pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985/1 "2018-06-14T18:52:26Z")

</div>

I have my own mapping that I dump to my running localhost:9200/abc.

In my elasticsearch.yml I have action.auto\_create\_index: false

I have a docker-compose that spins up elasticsearch, kibana and logstash.

Logstash input is logstash-input-jdbc. The output is to index abc, on 9200 elasticsearch.

Everything works. Kind of. I know I need to adjust when Logstash spins up. But, logstash seems to be creating a mapping index with the document type of "doc". My mapping has the type of "\_doc".

Can someone explain why logstash and elasticsearch are fighting efforts. I'm telling logstash that I have the index, use mine. Without the action.auto\_create\_index: false in elasticsearch.yml, logstash will create the index with the doc type of "doc". Wouldn't it make sense that if I tell it "no, don't create my index", that it won't - and it wouldn't have a conflict of types?!?!

logstash\_1 | [2018-06-14T18:45:05,129][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"abc", :\_type=\>"doc", :\_routing=\>nil}, #LogStash::Event:asfdasfdasfd], :response=\>{"index"=\>{"\_index"=\>"abc", "\_type"=\>"doc", "\_id"=\>"dasdfasdfasfd", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"Rejecting mapping update to [abc] as the final mapping would have more than 1 type: [\_doc, doc]"}}}}

---

<div class="post-metadata">

**Author:** ![dmongit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmongit/32/31968_2.png) [@dmongit](https://discuss.elastic.co/u/dmongit)\
**Post date:** [June 14, 2018, 7:02pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985/2 "2018-06-14T19:02:40Z")

</div>

To be clear, I know I can't have multiple types. I'm not trying to have multiple types. I can't figure out where the "doc" type is coming from.

---

<div class="post-metadata">

**Author:** ![dmongit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmongit/32/31968_2.png) [@dmongit](https://discuss.elastic.co/u/dmongit)\
**Post date:** [June 14, 2018, 7:56pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985/3 "2018-06-14T19:56:24Z")

</div>

Apparently action.auto\_create\_index only prevents Kibana from creating an index in localhost:5600?!? I see that it also prevents ES from creating an index within ES as well, but now I can't discover index patterns with action.auto\_create\_index set to false?! And, while ES doesn't create a "doc" type index, when I curl for it, I still have the same error message in my OP. I changed my mappings that I create on ES to "doc" and I can logstash-input-jdbc now without said error. But, it's wrong. It should be "\_doc" according to your documentation and other posts. And, I can't see my data in Kibana to see why my curl of a search fails (brings back data but way too much data - Logstash inputs on a schedule, each minute. It's duplicating data but I can't verify that in Kibana).

---

<div class="post-metadata">

**Author:** ![dmongit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmongit/32/31968_2.png) [@dmongit](https://discuss.elastic.co/u/dmongit)\
**Post date:** [June 15, 2018, 8:03pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985/4 "2018-06-15T20:03:15Z")

</div>

The answer is setting document\_type =\> "\_doc" in the output in logstash.conf

---

<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 13, 2018, 8:03pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update-to-as-the-final-mapping-would-have-more-than-1-type-doc-doc/135985/5 "2018-07-13T20:03:20Z")

</div>

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