# Getting and Error "Caanot assign multiple type to one index"

**URL:** https://discuss.elastic.co/t/getting-and-error-caanot-assign-multiple-type-to-one-index/130114
**Category:** Elasticsearch
**Created:** [May 1, 2018, 12:19pm UTC](https://discuss.elastic.co/t/getting-and-error-caanot-assign-multiple-type-to-one-index/130114 "2018-05-01T12:19:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [May 1, 2018, 12:19pm UTC](https://discuss.elastic.co/t/getting-and-error-caanot-assign-multiple-type-to-one-index/130114/1 "2018-05-01T12:19:57Z")

</div>

Hi Experts,

I am aware that multiple type cannot be assigned in ES6.x index. I have a CSV file and using LS I am parsing it . My ES6.x template is like below

```
PUT _template/test
{
  "index_patterns": ["test*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
"doc": {   
      "properties": {
        "managerReceiptTime": {
          "type": "date",
          "format": "dd MMM YYYY HH:mm:ss 'IST'"
        }
      }
    }
  }
}

```

Error

**"error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"Rejecting mapping update to [test-2018.18chep] as the final mapping would have more than 1 type: [doc, logs]"}**

Mapping cannot go without a type (doc) , can someone suggest how i can resolve this issue ? I have checked blogs and posts by ES like [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking-changes-6.0.html) but this does not help.

Regards  
VG

---

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [May 1, 2018, 1:18pm UTC](https://discuss.elastic.co/t/getting-and-error-caanot-assign-multiple-type-to-one-index/130114/2 "2018-05-01T13:18:13Z")

</div>

Well , I resolved the issue , since multitypes are deprecated in ES 6.x so i need to define only one type in the Template and same in the LS output filter . Problem resolved once I mentioned below in LS output filter , hope this will help someone.

LS Output filter

`document_type => "test"`

ES Template

```
{
  "index_patterns": ["cef*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
"test": {   
      "properties": {
        "managerReceiptTime": {
          "type": "date",
          "format": "dd MMM YYYY HH:mm:ss 'IST'"
        }
      }
    }
  }
}
```

---

<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 29, 2018, 1:18pm UTC](https://discuss.elastic.co/t/getting-and-error-caanot-assign-multiple-type-to-one-index/130114/3 "2018-05-29T13:18:15Z")

</div>

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