# Preparing cluster for the non-document-type in Elasticsearch 7

**URL:** <https://discuss.elastic.co/t/preparing-cluster-for-the-non-document-type-in-elasticsearch-7/175215>\
**Category:** Elasticsearch\
**Created:** [April 3, 2019, 1:54pm UTC](https://discuss.elastic.co/t/preparing-cluster-for-the-non-document-type-in-elasticsearch-7/175215 "2019-04-03T13:54:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roblopes](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@roblopes](https://discuss.elastic.co/u/roblopes)\
**Post date:** [April 3, 2019, 1:54pm UTC](https://discuss.elastic.co/t/preparing-cluster-for-the-non-document-type-in-elasticsearch-7/175215/1 "2019-04-03T13:54:11Z")

</div>

Hi,

I am preparing my first elastic cluster for a pilot project. I was using the document-type attribute, but after the announcement that it will be gone, I am only using (explicitly) "\_doc".

Since I am using templates, I was really defining the "\_doc" in the template, but with the new attribute `include_type_name=false`, I just removed the type from the template.

My assumption is that I wouldn't have to ingest my documents using the document-type attribute as well (I'm using Logstash output to Elasticsearch), however if I do so, I get an error saying that there is a conflict, because the default document from Logstash seems to be "doc", and the index created from the template, creates as "\_doc". Here is one error example:

```auto
[2019-04-03T09:44:07,416][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"log_gen_test_2019.04.18", :_type=>"doc", :routing=>nil}, #<LogStash::Event:0x7179734d>], :response=>{"index"=>{"_index"=>"log_gen_test_2019.04.18", "_type"=>"doc", "_id"=>"SQZx42kB46xwkZUbSU9B", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [log_gen_test_2019.04.18] as the final mapping would have more than 1 type: [_doc, doc]"}}}}

```

My quesiton is. From version 7 (and on), is this the expected behavior? I mean, it seems that I have to define `document_type => "_doc"` in the Logstash output. That is the way to do? I am ok with that, but just need to make sure, trying to be compliant to Elasticsearch 7, minimizing the migration impact.

Thanks,  
Rob

---

<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:** [May 1, 2019, 1:54pm UTC](https://discuss.elastic.co/t/preparing-cluster-for-the-non-document-type-in-elasticsearch-7/175215/2 "2019-05-01T13:54:20Z")

</div>

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