Reputation: 327
I am trying to use jruby neo4j.rb is to delete all nodes from Neo4j database:
Neo4j._query ("START n = node (*) DELETE n")
The query runs fine but the nodes still Appear in Neo4j web admin. What am I doing wrong?
Upvotes: 1
Views: 309
Reputation: 1463
This will only work if your nodes have no relationships. Otherwise, you need to delete those also. You can use the Cypher query Michael gives in his answer: Why does the cleandb extension refuse to delete my neo4j graph database?
If you don't have any relationships, perhaps is the webadmin that doesn't report correctly what it is in your DB. Have you tried counting the nodes with a Cypher query ?
start n=node(*) return count(n);
Upvotes: 1