Cypher: get properties of nodes in the path

247 views
Skip to first unread message

Tomas Teicher

unread,
Apr 29, 2012, 2:38:10 AM4/29/12
to ne...@googlegroups.com
 is it possible to get properties from nodes in the path?

For example: 
START a=node(3)
MATCH p = a-->b
RETURN p, b.name
In this example I can get name property of end node. But can I also get names also from path of not known length? When I have MATCH p = a-[:KNOWS*]->b return p, name?
thanks for help
Tomas


Peter Neubauer

unread,
Apr 29, 2012, 3:54:18 AM4/29/12
to ne...@googlegroups.com
Hi Tomas,
look at http://docs.neo4j.org/chunked/snapshot/query-function.html#_iterable_functions,
especially EXTRACT and FILTER.

Would that work?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j

Michael Hunger

unread,
Apr 29, 2012, 4:33:04 AM4/29/12
to ne...@googlegroups.com
Try it online here: http://tinyurl.com/borlnl7
Reply all
Reply to author
Forward
0 new messages