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 <[email protected]>:

> Hi,
> I am using Neo4j 2.1.2 and when I try to run the example given by Michael 
> Hunger here: 
> 
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to