I am new to Neo4j // Cypher and I am following the tutorial. Playing with the movie database i tried to delete all the "ACTED_IN" relationship using the following query
match (:Person)-[r:ACTED_IN]->(:Movie)
DELETE r;
however i found that i have i still have some "ACTED_IN" relations between nodes and i have to re-run the previous query several times to completely remove those relations.
why is it not working as i expected? what is the right way to do this?
thanks
Just tried, it worked for me (Using Neo4j 2.0.1 and 2.1.0-M01)
match (:Person)-[:ACTED_IN]->(:Movie) return count(*);
-> count(*)
172
match (:Person)-[r:ACTED_IN]->(:Movie) delete r;
-> Deleted 172 relationships, returned 0 rows in 172 ms
match (:Person)-[:ACTED_IN]->(:Movie) return count(*);
-> count(*)
0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With