Returning only simple paths in Neo4j Cypher query

前端 未结 3 1138

Given a query like the following:

START n = node(123)
MATCH p = n-[r:LIKES*..3]->x
RETURN p;

The result paths that I get with the query

3条回答
  •  醉酒成梦
    2020-11-29 06:02

    my workaround for this:

    START n = node(123), x=node(*)
    MATCH p = shortestPath(n-[r:LIKES*..3]->x)
    RETURN p;
    

    see the example in console

提交回复
热议问题