Hi, I have a question regarding how to model some data so that I can join two documents of different structure (Inside the same index differentiated by type field). My data structure is as follows:
- SessionCreatedEvent which has the properties sessionId, locale, date-of-birth, type='SessionCreated' and
- OrderPlaceEvent which also has sessionId, amount, type='OrderPlaced'.
I need to get the total amount for all orders placed in a specific country. How should I model this data in ES6 to get the answer. The problem I am having is both of the above events are not necessarily a parent child typed ones. There can be more event types that are related only by sessionId.
On a side note, I know that kibana does not support visualizations with parent child relations. Is it possible to execute a normal elasticsearch query that uses parent child relations and then apply some graphing on the result of the query?