Simplest but probably not most efficient: MATCH path=(a:Label {name:"Name A"})-[:parent_of*]->b RETURN path, length(path) as len ORDER BY len DESC LIMIT 1
On Sat, May 31, 2014 at 11:50 AM, Quazi Marufur Rahman <maruf.c...@gmail.com > wrote: > Hi, > > I have created a DAG using relationship like a-[:parent_of]->b. > How can I find the longest path starting from 'a' using cypher query? > > Thanks > > -- > 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 neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.