项目作者: soroushj

项目描述 :
SNN (Shared Nearest Neighbors) plugin for Neo4j.
高级语言: Java
项目地址: git://github.com/soroushj/neo4j-snn-plugin.git
创建时间: 2017-11-12T22:50:59Z
项目社区:https://github.com/soroushj/neo4j-snn-plugin

开源协议:GNU General Public License v3.0

下载


Neo4j SNN Plugin

This is a user-defined function for Neo4j which returns the number of shared nearest neighbors for two nodes.

Test & Build

  1. gradle build

Deploy

Copy the built jar file found in ./build/libs/ to the Neo4j plugins directory. For the default Neo4j plugins path on Ubuntu 16.04+:

  1. sudo cp ./build/libs/neo4j-snn-plugin.jar /var/lib/neo4j/plugins/

After copying the jar file, you need to restart the Neo4j service. On Ubuntu 16.04+:

  1. sudo service neo4j restart

Usage

Now you can use the function com.github.soroushj.snn in Cypher queries:

  1. MATCH (a:User {username: "alice"}), (b:User {username: "bob"})
  2. RETURN com.github.soroushj.snn(a, b)