Hi list,

is there a way to clean the DB and the indices programmatically?

The reason I'm looking for this is that I'm using (and instantiating) 
Neo4j from Spring. This works just great, however in order to run my 
tests from a clean state I need a way to clean the DB and indices. 
Stopping Neo4j and deleting the store dir is not really a viable option 
as I would have to recreate the start-up sequence that I have already 
defined in my Spring context config.

What I'm currently doing is iterate over the entire graph and delete all 
nodes and relationships. This works fine most of the time but sometimes 
gives me unexpected errors like "Node[xyz] has been deleted in this TX". 
This seems to be especially true when I run all tests in succession. 
Another problem with that approach is that there doesn't seem to be a 
way to find out which indices currently exist making it hard to safely 
delete them all.

So, any pointers would be greatly appreciated.

Thanks and best regards,
Georg
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to