6.0.1版本中mappings只能添加一个man,如果添加woman和man会报错的
6.0.1版本中mappings只能添加一个man,如果添加woman和man会报错的
6.0.1版本中mappings只能添加一个man,如果添加woman和man会报错的
2017-12-08
如你所说,确实会报错。
{ "error": { "root_cause": [ { "type": "illegal_argument_exception", "reason": "Rejecting mapping update to [people] as the final mapping would have more than 1 type: [woman, man]" } ], "type": "illegal_argument_exception", "reason": "Rejecting mapping update to [people] as the final mapping would have more than 1 type: [woman, man]" }, "status": 400 }
为什么呢?
总之,这是一个设计失误,后面的版本将不再支持。
官方给出解释是:https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html
举报