首页 > 解决方案 > 在没有遍历框架的情况下如何在 neo4j 中进行深度优先遍历?

问题描述

如何在没有遍历框架的情况下在 neo4j 中进行深度优先遍历。我没有使用嵌入式 neo4j 数据库。

标签: neo4j

解决方案


Cypher 可变长度扩展默认应使用 dfs(bfs 仅应在使用shortestPath().

否则,在配置映射中使用APOC 路径扩展器( apoc.path.expandConfig() ) 。bfs:false


推荐阅读