You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Neo4j
I need to recursively traverse the entire graph db following some
relationship type. Say for example I start from node with Id as 0. I
follow the path with outgoing relationship type "Friends" and get all
direct friends or indirect friends(may be friends of friends, friends
of friends of friends,... so on recursively). I wanted to do it using
Cypher query language. Could anyone please help me out. Thanks in
advance.
Mattias Persson
unread,
Jan 9, 2012, 8:09:43 AM1/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
I'd say
START a=node(0) MATCH a-[:FRIEND*]->x RETURN x.name
or for a max depth of 6
START a=node(0) MATCH a-[:FRIEND*1..6]->x RETURN x.name