【发布时间】:2016-01-28 18:57:54
【问题描述】:
我正在尝试将新类型添加为现有类型的子类型。从ElasticSearch documentation,看起来这是可能的,但没有关于如何做到这一点的详细信息。
文档是这样说的:
这必须在创建索引时完成,或者在创建子类型之前使用更新映射 API 完成。
update-mapping API documentation 中没有关于设置父子关系的详细信息。
直觉上,我认为应该允许在父母已经存在之后建立父子关系,因为父母不需要知道孩子的任何事情。
这是我小时候创建新类型时遇到的错误:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "can't add a _parent field that points to an already existing type"
}
],
"type": "illegal_argument_exception",
"reason": "can't add a _parent field that points to an already existing type"
},
"status": 400
}
【问题讨论】:
-
你试过了吗?发生了什么?
-
这是错误:{ "type": "illegal_argument_exception", "reason": "can't add a _parent field that point to an already existing type" }
标签: elasticsearch