Re: [Neo4j] How to find lowest common ancestor of two nodes

2014-05-05 Thread Michael Hunger
Try Match (c)-[*]->(x)<-[*]-(d) return x And Match p=shortestPath((a)-[*]-(b)) Return nodes(p) If you have more rel-types, use (c)-[:KNOWS*]->(x) Sent from mobile device Am 03.05.2014 um 20:54 schrieb Quazi Marufur Rahman : > Hi, > > I have created a directed acyclic graph using py2neo. Pa

[Neo4j] How to find lowest common ancestor of two nodes

2014-05-04 Thread Quazi Marufur Rahman
Hi, I have created a directed acyclic graph using py2neo. Part of it looks like, a->b b->c b->d c->d Here '->' represents 'knows' I have two questions. 1. How can I find the node which knows both 'c' and 'd' and closest to them? Something like lowest common ancestor in tree. 2. How to