我的操作:
父母:国家,子女:分支机构,孙子:雇员
PUT/company {"mappings":{"branch":{"_ parent":{"type":"country"}},"employee":{"_ parent":{"type":"branch"}}}}
我想添加一个孙子employee2,父亲是分支:
PUT/company/employee2/_mapping {"employee2":{"_ parent":{"type":"branch"}}}
我收到错误的消息:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"无法添加指向已存在类型的_parent字段"}],"type":"illegal_argument_exception" ,"reason":"无法添加指向已存在类型的_parent字段"},"status":400}
我不知道该怎么办.有什么建议吗?谢谢.