如何让本地的 Neo4j 支持 APOC 库

APOC 是啥

Neo4j 3.x introduced the concept of user-defined procedures and functions. Those are custom implementations of certain functionality, that can’t be (easily) expressed in Cypher itself. They are implemented in Java and can be easily deployed into your Neo4j instance, and then be called from Cypher directly.

The APOC(Awesome Procedures On Cypher) library consists of many (about 450) procedures and functions to help with many different tasks in areas like data integration, graph algorithms or data conversion.

如何让本地的 Neo4j 支持 APOC 库

前提:已安装 Neo4j.

官网介绍的,APOC 的版本要与 Neo4j 相匹配,需要确保两者版本号的前两位数是相同的。

版本对应

到这个仓库(https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/)下载对应版本的 apoc-x.x.x.x-all.jar 文件,并将其放到 $NEO4J_HOME/plugins 文件夹下,其中 $NEO4J_HOME 指 Neo4j 在你电脑安装中的位置,如:D:\neo4j-community-4.2.18

之后使用 neo4j restart 重启 Neo4j 后便可使用 APOC 库了。

以下,是一个使用 APOC 中集合相似度计算函数(sorensenDiceSimilarity)的例子:

例子

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值