My operation:
parent: country, child: branch, grandchild: employee
PUT /company { "mappings": { "branch": { "_parent": { "type": "country" } }, "employee": { "_parent": { "type": "branch" } } } }
I want add a grandchild employee2, parent is branch:
PUT /company/employee2/_mapping { "employee2": { "_parent": { "type": "branch" } } }
I get wrong message:
{ "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 }
I don't know how can i do. Have any suggestion? Thanks.