I'm having a little trouble understanding how multiple MATCH clauses work. 
 Let's say I have a graph nodes with a "visible" property that indicates 
whether the node is visible.  I want to form a query that return all of the 
visible nodes any related nodes that are visible and the relationship 
between the visible nodes.  I've come up with the following query:

MATCH n WHERE n.visible = true OPTIONAL MATCH n-[r]->m where m.visible = 
true return n,r,m

This seems to work fine, but I'm not sure I understand why. Is this a sort 
of "pipe" in which the result of the first MATCH is piped into the second 
OPTIONAL MATCH? Or is it more correct to say that forms the intersection of 
the results of the two MATCH clauses?  Or is there a much better way to 
describe this behavior?

Thanks

-brian



-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to