Can't add properties to a new type

    PUT /customers/_mapping/instore
{
  "properties":{
    "name":{
      "type":"text",
      "analyzer":"standard"
    }
  }
}

ERROR:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Rejecting mapping update to [customers] as the final mapping would have more than 1 type: [instore, online]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Rejecting mapping update to [customers] as the final mapping would have more than 1 type: [instore, online]"
  },
  "status": 400
}

You can't add 2 types in a 6.x index.

Can you please elaborate?
What if I want to use two types online and instore and I want to set the properties for both of them?

Read this blog post about the removal of types in Elasticsearch 6.0.

2 Likes

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