Hi, I'm trying to use the query that Michael wrote: MATCH (a)
LIMIT 10000 OPTIONAL MATCH (a)-[r]-() DELETE a,r RETURN count(*); And it doesn't work: Invalid input 'I': expected 'o/O' (line 2, column 2) "LIMIT 10000" What can I do? I'm using the version 2.1.5 Fran On Tuesday, 17 June 2014 15:11:54 UTC+2, ducky wrote: > > oh, that was a really useful command when updating large datasets. +1 for > this feature please. > > > On Tuesday, 17 June 2014 14:08:08 UTC+1, Michael Hunger wrote: >> >> Sorry, that feature was removed between M06 and 2.1.0 :( >> >> So what you have to do is to run this repeatedly: >> >> MATCH (a) >> >> LIMIT 10000 >> >> OPTIONAL MATCH (a)-[r]-() >> DELETE a,r >> >> RETURN count(*); >> >> until it returns 0. >> >> You can try higher limits though, depeding on the number of relationships >> per node, with 10 rels per node this will be 100k ops, with 100 -> 1M ops. >> >> Michael >> >> Am 17.06.2014 um 15:05 schrieb ducky <rohit.a...@gmail.com>: >> >> Hi, >> I am using Neo4j 2.1.2 and when I try to run the example given by Michael >> Hunger here <http://jexp.de/blog/2014/02/cleaning-out-your-graph/>: >> >> Query: >> USING PERIODIC COMMIT >> MATCH (a) >> OPTIONAL MATCH (a)-[r]-() >> DELETE a,r; >> >> Error: >> Neo.ClientError.Statement.InvalidSyntax >> >> Invalid input 'M': expected whitespace, comment, an integer or LoadCSVQuery >> (line 2, column 1) >> "MATCH (a)" >> >> >> My question is: has the use of this command changed since this blog post? >> >> cheers >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.