Visualizing parent-child relations

Hi ,

I have created an index with parent/child relations
(following this example: https://www.elastic.co/guide/en/elasticsearch/guide/current/indexing-parent-child.html )

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)

thanks
Amos

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 ?

thanks
amos

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: https://github.com/elastic/kibana/issues/1084

Hi,

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.

BR,
Christian

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"...

https://github.com/elastic/kibana/issues/1084 is the best one AFAIK.

These are forums, not Github issues :slight_smile: