Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只需要返回一个匹配的结束节点,它可以是一个或两个路径段。例如:
start me=node(1) match me-[:FRIEND_OF]->parent, me-[:FRIEND_OF]->child-[:CHILD_OF]->parent return parent;
我只希望父母回来,但在某些情况下,孩子是我的朋友。我怎样才能让父母回来?
也许添加这个会有所帮助。我对你的例子并不完全清楚。这会过滤掉作为孩子的“父母”。
... where not(()-[:CHILD_OF]->parent) return parent;