Visualizing parent-child relations

(Amos) #1

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)


(Mark Walkom) #2

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

(Amos) #3

Thanks Mark,

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

what is the best alternative ?


(Tanya Bragin) #4

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:

(Christian Pirngruber) #5


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.


(Cherah30) #6

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 !!!

(rastro) #7

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

(Mark Walkom) #8 is the best one AFAIK.

These are forums, not Github issues :slight_smile:

(system) #9