Neo4J find the path between two nodes

# All nodes between two paths
the MATCH = P (A) - [*] -> (B)
the RETURN P

# A-> B directly connected to
the MATCH = P (A) - [] -> (B)
the RETURN P


# A -...> three relationship between two nodes and BA, B
# is equivalent to (A) - () - () -> (B)
the MATCH = P (A) - [*. 3] -> (B )
the RETURN P


# path comprises two or more relations
the MATCH = P (A) - [2 .. *] -> (B)
the RETURN P


# 8 contained within the relationship path
MATCH p = (a) - [ * .. 8] -> (B)
the RETURN P

# path comprising three to five relations
the MATCH = P (A) - [3..5 *] -> (B)
the RETURN P
-------------- -
Disclaimer: this article is CSDN blogger "cuckoo say" original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/huibiannihao/article/details/100039030

Guess you like

Origin www.cnblogs.com/cuiyubo/p/11592742.html