Reputation: 6689
I am using Neo4j
database with spring-data-neo4j
. Now, I want to import pretty large datasets so I looked into the capabilities of neo4j
for batch insertions.
After my research I found out about:
BatchInserter
for embedded database: http://docs.neo4j.org/chunked/stable/batchinsert.html and Michael Hunger project that uses it: https://github.com/jexp/batch-import/Now, I am wondering if it is possible to somehow use the repository feature of spring-data-neo4j
for batch inserts, because even the method save(Iterable<U> entities)
in AbstractGraphRepository
just iterates through every element and invokes save
for one entity:
@Override
@Transactional
public <U extends T> Iterable<U> save(Iterable<U> entities) {
for (U entity : entities) {
save(entity);
}
return entities;
}
Upvotes: 2
Views: 1685
Reputation: 41676
Right now there is no official support for batch insertion.
But you can try something like this: http://code.paananen.fi/2012/04/05/neo4j-batchinserter-and-spring-data-for-neo4j/
It is using SDN versions pre 3.0 though
Upvotes: 1