Search code examples
elasticsearchopensearchaws-elasticsearchamazon-opensearch

OpenSearch: how to define parent/child relationship between documents?


Due to AWS migration I have to migrate from ElasticSearch to OpenSearch. The OpenSearch will be provisioned by AWS OpenSearch Service.

The existing documents in ES index has parent/child relationship created using join field type. I don't see such mapping type in the OpenSearch documentation.

Question: How can I define parent/child relationship in OpenSearch?

UPDATED: The currently used ES version is 6.8. As for migration, the preference is to use the latest OpenSearch version.


Solution

  • It's not in the documentation, but there's code related to join field type, e.g. ParentJoinFieldMapperTests.java, so I think it's there for you to try.