Something like this should work:

MATCH p=shortestPath(a)-->(b)-->(c)
WHERE a.name='Alice' AND b.name='Bob' AND c.name='Daniel'
RETURN extract(n IN nodes(p)| n.name) AS extracted

On Wednesday, May 6, 2015 at 11:29:47 AM UTC-4, FERHAT Ilyes wrote:
>
> Hi, 
> I'm trying to find the shortest path between two given nodes, the path 
> contains several nodes that contain a name and other properties! Is there a 
> cypher query that returns only the names of the nodes that belong to this 
> shortest path ?! 
>

-- 
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