Load2neo

Load2neo is a server extension written for Neo4j 2.0 and upwards that provides a facility for bulk loading data into a Neo4j database. Currently, only the Geoff format is supported although it is planned that support for other formats will follow.

Installation

To install, you will first need to download the latest distribution from here:

This zip archive contains three files - two jars which need to be copied to your server's plugin directory and a neo4j-server.properties file that contains content to be added to the identically named file within the server's conf directory. This is a single line which mounts the plugin at the correct URI offset:

org.neo4j.server.thirdparty_jaxrs_classes=com.nigelsmall.load2neo=/load2neo

Usage

Bulk Load

curl -X POST http://localhost:7474/load2neo/load/geoff -d '(a)<-[:KNOWS]->(b)'
curl -X POST http://localhost:7474/load2neo/load/geoff -d @foo.geoff

Bulk Delete

curl -X DELETE http://localhost:7474/load2neo/all-the-things

Performance

In limited tests, load2neo has shown good performance. The timings below were taken for a repeated load of a test file containing 40,000 nodes and 40,000 relationships on a quad-core AMD Phenom™ II X4 965 with 4GB RAM.

turnparse time (ms)load time (ms)
1*1185253682
27602074
37401745
46891593
56991585
66941529
76701530
86831827
97151622
106711531
116641565
126951542
137191590

minimum6641529
maximum7602074
average7001644

* The first turn was discarded to allow the cache to warm up