# Issue using \_doc as type name in dest index when moving data from multi type index in 5.6.10 to single type index in ES 6.3.1

**URL:** <https://discuss.elastic.co/t/issue-using-doc-as-type-name-in-dest-index-when-moving-data-from-multi-type-index-in-5-6-10-to-single-type-index-in-es-6-3-1/145993>\
**Category:** Elasticsearch\
**Created:** [August 24, 2018, 11:48pm UTC](https://discuss.elastic.co/t/issue-using-doc-as-type-name-in-dest-index-when-moving-data-from-multi-type-index-in-5-6-10-to-single-type-index-in-es-6-3-1/145993 "2018-08-24T23:48:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gautam\_Priya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gautam_priya/32/15262_2.png) [@Gautam\_Priya](https://discuss.elastic.co/u/Gautam_Priya)\
**Post date:** [August 24, 2018, 11:48pm UTC](https://discuss.elastic.co/t/issue-using-doc-as-type-name-in-dest-index-when-moving-data-from-multi-type-index-in-5-6-10-to-single-type-index-in-es-6-3-1/145993/1 "2018-08-24T23:48:03Z")

</div>

TL;DR: This question is about the problem -

```auto
"cause": {
        "type": "illegal_argument_exception",
        "reason": "Rejecting mapping update to [account] as the final mapping would have more than 1 type: [Account, _doc]"
      }

```

I have a multi type index in 5.6.10 that I am attempting to migrate to 6.3.1 by creating 7 single type indices instead of the single index with 7 types - thinking that better bite this bullet now than wait till ES 7.x to do this. Now to that end, I have successfully created the indices in the 6.3.1 cluster. However, when I attempted to migrate data from the multi-index + type to the single index hosting that type in 6.3.1 I ran into the error at the top of this post. Here is an example:

```auto
POST _reindex
{
  "source": {
    "remote": {
      "host": "http://localhost:9200"
    },
    "index": "multi-type-index",
    "type": "Account"
  },
  "dest": {
    "index": "account"
  }
}

```

The multi-type-index contains an _Account_ type and the account index contains a _\_doc_ type identical in structure to the _Account_ type. Attempting the _\_reindex_ operation above, results in the error below.

```auto
"cause": {
        "type": "illegal_argument_exception",
        "reason": "Rejecting mapping update to [account] as the final mapping would have more than 1 type: [Account, _doc]"
      }

```

Note that when I change the type name from _\_doc_ to _Account_ in the single type account index, the _\_reindex_ operation succeeds.

Now I am trying to keep the _\_doc_ type name in the account index per elasticsearch guidelines. How can I achieve this without having to jump through hoops.

---

<div class="post-metadata">

**Author:** ![Gautam\_Priya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gautam_priya/32/15262_2.png) [@Gautam\_Priya](https://discuss.elastic.co/u/Gautam_Priya)\
**Post date:** [September 16, 2018, 9:33pm UTC](https://discuss.elastic.co/t/issue-using-doc-as-type-name-in-dest-index-when-moving-data-from-multi-type-index-in-5-6-10-to-single-type-index-in-es-6-3-1/145993/2 "2018-09-16T21:33:56Z")

</div>

Pointers on ways around this problem would be much appreciated.

---

<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:** [October 14, 2018, 9:34pm UTC](https://discuss.elastic.co/t/issue-using-doc-as-type-name-in-dest-index-when-moving-data-from-multi-type-index-in-5-6-10-to-single-type-index-in-es-6-3-1/145993/3 "2018-10-14T21:34:09Z")

</div>

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