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

TL;DR: This question is about the problem -

"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:

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.

"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.

Pointers on ways around this problem would be much appreciated.

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