Graphing parent-child relationship tree

Hi there,

I have records in elastic search which have a parent-child relationship which forms a tree. This is represented using two fields, let's say id and parent_id. I would like to use graph to obtain a visual representation of this tree.

Right now, I am using the following settings:

  • In Graph settings:
  • Significant links disabled
  • Certainty = 1
  • In graph advanced mode, I am selecting only the two relevant fields, id and parent_id.

When running a query, unfortunately, Graph only plots one depth level of the parent-child relationship. It looks something like this (excuse my ASCII art):

(id child1)----------(parent_id parent1)-----------(id child2)

(id parent1)------------(parent_id grandparent)

What I would like, of course, is to join the two separate structures into something like this:

(id child1)--------
(id child2)---------(id parent1)-----------(id grandparent)

Any ideas are greatly appreciated. Thanks!

Dan

This looks like a duplicate of this question: Can graph query (non-cyclic, non-duplicated) ancestors and descendants?

And it sure would be great to have a solution for this!

Indeed it is! Thanks Mark.