使用FIND PATH语句可以避免查询形成闭环,并且还可以查询起始点和目标点最短路径,最全路径等。
例如查找两点最短路径:
FIND SHORTEST PATH FROM "player102" TO "team204" OVER *;
查找最全路径:
FIND ALL PATH FROM "player100" TO "team204" OVER *;
查找查找非循环路径:
FIND NOLOOP PATH FROM "player100" TO "team204" OVER *;
文档参考:https://docs.nebula-graph.com.cn/2.6.2/3.ngql-guide/16.subgraph-and-path/2.find-path/
注意:本文归作者所有,未经作者允许,不得转载