I have a Neo graph that if I choose certain relationships, is a tree.
I would like to start at an arbitrary node and find all nodes up to the root. I want returned to me all the nodes in between the two, including the ends. I need the nodes in order, in the case of the example, "a, t, c, d, e, ROOT".
Imagine the tree has a branch that looks like
a-[]->t-[]->c-[]->d-[]->e-[]->ROOT
If the relationships I care about are x, y, and z, and if the root node is called ROOT, and the starting node has a certain id (unique value), I get something like this:
(a {id:an_id})-[*:x|y|z]->(root:ROOT) return a, root
That returns me the ends, but how do I also get the nodes between them?
edit
nodes(...) http://neo4j.com/docs/stable/query-functions-collection.html#functions-nodes
y:) - Michael Hunger