我已经下载安装了apoc,版本为3.5.0.4
Neo4j是社区版3.5.6
运行以下语句:
MATCH (c:Character)
WITH collect© AS characters
CALL apoc.algo.betweenness([‘INTERACTS’], characters, ‘BOTH’) YIELD node, score
SET node.betweenness = score
RETURN node.name AS name, score
ORDER BY score DESC
报错:
Neo.ClientError.Procedure.ProcedureNotFound
Neo.ClientError.Procedure.ProcedureNotFound: There is no procedure with the name apoc.algo.betweenness
registered for this database instance. Please ensure you’ve spelled the procedure name correctly and that the procedure is properly deployed.
Neo4j.conf文件中也加了这句:dbms.security.procedures.unrestricted=algo.,apoc.
(变换着试了dbms.security.procedures.unrestricted=apoc.,algo. ;
dbms.security.procedures.unrestricted=algo.*
dbms.security.procedures.unrestricted=apoc.*
)这三种情况都报同样的错误。不知问题出在哪里了?请指教!谢谢!
这个得去查官网api, 查到了,3.4版有apoc.algo.betweenness 存储过程,3.5以后就取消掉了这个存储过程。 3.5 之后有以algo.betweenness开头的同样功能的存储过程,详细请看下面链接 https://neo4j.com/docs/graph-algorithms/current/algorithms/betweenness-centrality/