[Neo4j] BatchInserter & GraphDatabaseService pointing to the same graph db

David Montag david.montag at neotechnology.com
Mon Aug 16 13:07:45 CEST 2010

Hi Honnur,

I believe that you will have to shutdown() the EmbeddedGraphDatabase first
before using the BatchInserter. And keep in mind that the BatchInserter
should only be used from a single thread. You could of course build your own
GraphDatabaseService that delegates to these two implementations, but you'd
have to take the threading aspect into mind. And you'd have to
re-instantiate the EmbeddedGraphDatabase for caching reasons though, and
then you'd lose your whole cache. So I'd say, just go with

Please explain the "dynamic" usage and your scenario more.


On Mon, Aug 16, 2010 at 10:30 AM, Honnur Vorvoi <vhonnur at yahoo.com> wrote:

> Would it be possible to switch between BatchInserter(say when the inserts
> are more than 25000) and GraphDatabaseService ( when the inserts are less
> than 25000) pointing to the same graph db?
> We would like to use the BatchInserter for bulk inserts and the normal
> EmbeddedGraphDatabase for regual operations within the same application.
> Would be interested in any better suggestions for inserting
> nodes/relationships dynamically(ie, when all the nodes/relationships are not
> available initially but only during the usage of the application)
> Thank you
> _______________________________________________
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

More information about the User mailing list