Elasticsearch introduced in version 6.x the concept of joined documents.
This offers the possibility to join to documents between them, which will then be related with a parent / child relation.
You can find in this article how to create joined documents with Stambia DI Elasticsearch Connector.
- Stambia DI Elasticsearch Connector 1.1.1 or higher
After having reversed a document with a join in your Elasticsearch Metadata, simply add a new value named "routing" at the document's root, and map it in your Mappings:
That's it, you can now use this to define the routing in your Mappings and create joined documents.
In a Mapping, simply map or specify the routing parameter when working with joined documents.
The Parent and child document must have the same routing value to create a relation between them.