Here is the scenario: I have graph with a series of documents that reference each other with directed relationships. A given document may reference parents, grandparents, and or great-grandparents. What I am interested in is reducing the graph to bare essence to so that the reference node relationships go through the tree structure. I am looking to pare down the relationships to highlight the the flow through the documents.
For example if a start with this.
My hand trimming reveals this:
Is there a generic cypher strategy to reveal this pattern from the original. I have date properties and document serial numbers as property keys to assist.
How would I go about writing this?