Skip to content

soroushj/neo4j-proximity-score-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo4j Proximity Score Plugin

This is a user-defined function for Neo4j which returns a proximity score for two nodes. The proximity score is defined as proximity(A, B) = log(1 + paths(A, B)), where A and B are two nodes in the graph and paths(A, B) is the number of all shortest paths between A and B.

Test & Build

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+:

sudo cp ./build/libs/neo4j-proximity-score-plugin.jar /var/lib/neo4j/plugins/

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

sudo service neo4j restart

Usage

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

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

About

A proximity score plugin for Neo4j.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages