# Elasticsearch 6.0 multiple types problem

**URL:** https://discuss.elastic.co/t/elasticsearch-6-0-multiple-types-problem/108928
**Category:** Elasticsearch
**Created:** [November 23, 2017, 5:09pm UTC](https://discuss.elastic.co/t/elasticsearch-6-0-multiple-types-problem/108928 "2017-11-23T17:09:12Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)
#### Post date: [November 23, 2017, 5:42pm UTC](https://discuss.elastic.co/t/elasticsearch-6-0-multiple-types-problem/108928/2 "2017-11-23T17:42:14Z")

</div>

Check out [this upgrading advice](https://www.elastic.co/guide/en/logstash/6.0/upgrading-logstash-6.0.html) or [this sticky in the Logstash subforum](https://discuss.elastic.co/t/attention-logstash-6-0-0-known-issue-indexing-to-elasticsearch-6-0/108789).

What you need to do is explicitly set `document_type` in the `elasticsearch` output, like this:

```
elasticsearch {
  hosts => ["localhost:9200"]
  index => 'fg-%{+YYYY.MM.dd}'
  document_type => doc
}

```

This may not work for any existing indexes, as there will already be a type defined in the mapping of those indexes, but it will work for all new indexes.

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-6-0-multiple-types-problem/108928)._
