Visualizing parent-child relations

Hi ,

I have created an index with parent/child relations
(following this example: )

POST /company/branch/_bulk
{ "index": { "_id": "london" }}
{ "name": "London Westminster", "city": "London", "country": "UK" }

POST /company/employee/_bulk
{ "index": { "_id": 2, "parent": "london" }}
{ "name": "Mark Thomas", "dob": "1982-05-16", "hobby": "diving" }

How can I create a Kibana graph of hobby distribution by country
(combine parent and child data)


KB doesn't do P/C at the moment sorry!

Thanks Mark,

So what are the alternatives ? change the index into a nested structure

what is the best alternative ?


You can flatten the structure into a single level document, or you can use nested documents with "include_in_parent" mapping, which virtually does the same thing. The latter workaround described in this issue:


Any plans on inluding P/C aggregation in Kibana any time soon?

In our case (translated to the branch/employee example) we cannot "nest" all employees within the branch document, because we add many new employees (belonging to one branch) to the index and it seems to me that would be too many updates on the branch document, if we can't handle them as different documents.


That is to say Document = a series of strings ("key", "value") where key and a value is a simples strings( without any structure).

Accepting this hypothesis, is forget the only benefit of "DOCUMENT" compared to a classic table of BDDr ...
Is not there something wrong !!!

1 Like

Is there a github issue we can follow for this? (I couldn't find one...)

p.s. "The last reply to this topic is now over 460 days old"... is the best one AFAIK.

These are forums, not Github issues :slight_smile: