为啥neo4j查询路径使用with之后返回了一大堆重复的?
发布于 6 年前 作者 enze0824 3935 次浏览 来自 问答

MATCH path = (a)<–>(o) WHERE id(a) = 1 with path as paths,nodes(path) as nodes match p=©–(d) where (id(d) in [3,21,4,39,2]) and c in nodes RETURN paths,p 这样查询返回了好多条重复的路径

2 回复

MATCH path = (a)<–>(o) WHERE id(a) = 1 return path as paths,nodes(path) as nodes

看看这边nodes变量里面是否已经重复了吧

返回的记录里重复了三四次。。。 我再看看吧

回到顶部