Update-mapping API syntax for parent child relationship

Hi,

We are using AWS Elastic Search Service.
We have requirement to create parent - child relationship where parent index already exists.

Below link says that we can create the same using "update-mapping" API
https://www.elastic.co/guide/en/elasticsearch/guide/current/parent-child-mapping.html

We tried below syntax but i didn't worked

curl -XPUT EndPoint/INDEXNAME/CHILDTYPE/_mapping -d '{ "CHILDTYPE" : { "_parent" : { "type" : "PARENTTYPE" } } }'

Error - "reason":"can't add a _parent field that points to an already existing type"}]"

Can someone please help us with update-mapping syntax ?

Thanks,
Archi

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