Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxdemarzi/pagerank_spi
https://github.com/maxdemarzi/pagerank_spi
database graph graph-database graphs neo4j neo4j-server pagerank
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxdemarzi/pagerank_spi
- Owner: maxdemarzi
- License: mit
- Created: 2016-02-09T17:12:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-19T16:13:37.000Z (about 8 years ago)
- Last Synced: 2024-12-10T00:48:01.947Z (12 days ago)
- Topics: database, graph, graph-database, graphs, neo4j, neo4j-server, pagerank
- Language: Java
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Custom Page Rank
================This is an unmanaged extension running a Custom Pagerank algorithm on Companies with a SIMILAR relationship score >= 0.80.
# Quick Start
1. Build it:
mvn clean package
2. Copy target/pagerank-1.0.jar to the plugins/ directory of your Neo4j 2.3.0-M03 server.
mv target/pagerank-1.0.jar neo4j/plugins/.
3. Configure Neo4j by adding a line to conf/neo4j-server.properties:
org.neo4j.server.thirdparty_jaxrs_classes=com.maxdemarzi.pagerank=/v1
If you need to configure 2 extensions at the same time, use a comma between them:
org.neo4j.server.thirdparty_jaxrs_classes=com.maxdemarzi.recruit=/v1,com.maxdemarzi.pagerank=/analytics4. Start Neo4j server.
5. Create sample dataset:
CREATE (a:Company {name:'a'})
CREATE (b:Company {name:'b'})
CREATE (c:Company {name:'c'})
CREATE (d:Company {name:'d'})
CREATE (e:Company {name:'e'})
CREATE (f:Company {name:'f'})
CREATE (g:Company {name:'g'})
CREATE (h:Company {name:'h'})
CREATE (i:Company {name:'i'})
CREATE (j:Company {name:'j'})
CREATE (k:Company {name:'k'})
CREATE
(b)-[:SIMILAR]->(c),
(c)-[:SIMILAR]->(b),
(d)-[:SIMILAR]->(a),
(e)-[:SIMILAR]->(b),
(e)-[:SIMILAR]->(d),
(e)-[:SIMILAR]->(f),
(f)-[:SIMILAR]->(b),
(f)-[:SIMILAR]->(e),
(g)-[:SIMILAR]->(b),
(g)-[:SIMILAR]->(e),
(h)-[:SIMILAR]->(b),
(h)-[:SIMILAR]->(e),
(i)-[:SIMILAR]->(b),
(i)-[:SIMILAR]->(e),
(j)-[:SIMILAR]->(e),
(k)-[:SIMILAR]->(e);6. Call the pagerank endpoint:
:GET /v1/service/pagerank
You should see "PageRank for Company using SIMILAR relationship type Completed!"7. Check the pageranks of some nodes:
MATCH (n:Company) RETURN n.name, n.pagerank LIMIT 25;