简体   繁体   English

具有图形数据科学的嵌入式 Neo4j - BFS 过程似乎缺失

[英]Embedded Neo4j with Graph Data Science - BFS Procedure appears to be missing

The documentation here https://neo4j.com/docs/graph-data-science/1.1/algorithms/bfs/#algorithms-bfs describes a callable "gds.alpha.bfs.stream". https://neo4j.com/docs/graph-data-science/1.1/algorithms/bfs/#algorithms-bfs的文档描述了一个可调用的“gds.alpha.bfs.stream”。

In order to call that, to the best of my knowledge, it needs to be registered with the embedded DB.为了调用它,据我所知,它需要在嵌入式数据库中注册。 Something along the lines of类似的东西

Procedures proceduresService = ((GraphDatabaseAPI) graphDb).getDependencyResolver().resolveDependency(Procedures.class);
proceduresService.registerProcedure(AllShortestPathsProc.class, true);

Otherwise neo4j will throw an Exception, informing us of our misdeeds:否则 neo4j 将抛出异常,通知我们我们的不当行为:

There is no procedure with the name gds.alpha.bfs.stream registered for this database instance.没有为此数据库实例注册名称为gds.alpha.bfs.stream的过程。 Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.请确保您正确拼写了过程名称并且该过程已正确部署。

However, I can't seem to find any *Proc.class to include for BFS or BreadthFirstSearch.但是,我似乎找不到任何 *Proc.class 包含在 BFS 或 BreadthFirstSearch 中。

Is this documentation incorrect?该文档不正确吗? Do i need a different jar to use the described bfs algorithm?我需要不同的 jar 来使用描述的 bfs 算法吗?

OT: I'm linking to an older version of the documentation because it supports a maxCost condition for traversed relations. OT:我链接到旧版本的文档,因为它支持遍历关系的 maxCost 条件。 This is missing from newer versions (which also don't seem to actually have have BFSProc)较新的版本缺少此功能(实际上似乎没有 BFSProc)

The required procedure is conveniently called "TraverseProc" and allows use of both BFS and DFS.所需的过程方便地称为“TraverseProc”,并允许使用 BFS 和 DFS。

The file doesn't include the name of the callable, either.该文件也不包含可调用文件的名称。 Discovered it through search of all my neo4j dependencies with通过搜索我的所有 neo4j 依赖项发现它

find . -name "*.jar" -exec zipgrep "gds.alpha" '{}' \;

(from How to search for a string in JAR files ) (来自如何在 JAR 文件中搜索字符串

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM