Unable to create index with more that 1 type in 6.x

I'm on elasticsearch 6.0.0-rc2 and I've found I've not able to create an index with multiple types:

PUT twitter
{}

PUT twitter/_mapping/user 
{
  "properties": {
    "name": {
      "type": "string"
    }
  }
}

PUT twitter/_mapping/user2 
{
  "properties": {
    "name": {
      "type": "string"
    }
  }
}

Returns

  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Rejecting mapping update to [twitter] as the final mapping would have more than 1 type: [user2, user]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Rejecting mapping update to [twitter] as the final mapping would have more than 1 type: [user2, user]"
  },
  "status": 400
}
3 Likes

This is expected as per the list of breaking changes for Elasticsearch 6.0. You can read more about it in this blog post.

5 Likes

Thanks, I hadn't seen that.

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