[Neo4j] help with traversals

Amos Ben Israel lucis.dominus at gmail.com
Thu Dec 23 11:42:21 CET 2010


Hello,

I'm trying to find all paths between two nodes when relations can be of one
of two types (A or B) without repeating the same node twice - so far quite
simple.
the complication is that relations of type A have a property P and I want
only paths where P has the same value all the way (but can have two
different values in two different paths).
I tried to have a variable that is reset every time the traverse "starts
again from the beginning" but find it difficult to know when did this
happen. position.length() helps when I only have relations of type A - it
does not ignore relations of type B which can be on the path.
iterating over the path at each position works but seems inefficient - I'd
like to hear ideas for a more efficient solution.

Amos.


More information about the User mailing list