赞
踩
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 相匹配,需要确保两者版本号的前两位数是相同的。
到这个仓库(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)的例子:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。