I have a large tree structure and my goal is to find the first intersection between to points.
In the test here I start a point and following a path to another node. Hopefully you can see the picture.
The query returns a path from the target all the way back to base root. The start point is not included on the path. Returned path
Notice the start node, 'A01D41/10', is not on the list.
Second part: There is property key, level (int), associated with each node. How do I return the minimum level (lowest common node) and its ID?
So what is wrong with this query:
CALL algo.dfs.stream('cpc', 'Reports_to', 'start', Id(target)) YIELD nodeIds
UNWIND nodeIds as nodeId
RETURN algo.asNode(nodeId).cpcClass as class