Clear the database?

1,384 views
Skip to first unread message

Kevin Burton

unread,
Jan 5, 2016, 4:15:40 PM1/5/16
to Neo4j
I have tried to run the suggested Cypher query to removed all nodes and relationships like:

START n = node(*) MATCH n-[r]-() DELETE n, r
But when I browse to the database I still see "Property Keys". Can/Should those be removed as well?

Thank you.

Clark Richey

unread,
Jan 5, 2016, 4:46:06 PM1/5/16
to ne...@googlegroups.com
If you are referring to the properties on the left of the browser, those are essentially cached. If you stop and restart the server they should clear. 

Sent from my iPhone
--
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.

Kevin Burton

unread,
Jan 5, 2016, 4:47:14 PM1/5/16
to ne...@googlegroups.com
Thank you.
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/va_WOnviyjk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.

Michael Hunger

unread,
Jan 5, 2016, 5:17:17 PM1/5/16
to ne...@googlegroups.com
Since Neo4j 2.3 this works too

MATCH (n) DELETE DETACH n

Michael

Am 05.01.2016 um 22:47 schrieb Kevin Burton <ronald.ke...@gmail.com>:

Thank you.

On Tuesday, January 5, 2016, Clark Richey <clark....@gmail.com> wrote:
If you are referring to the properties on the left of the browser, those are essentially cached. If you stop and restart the server they should clear. 

Only if you deleted the database directory.

Labels and rel-types not in use will not be shown.

Michael

Kevin Burton

unread,
Jan 6, 2016, 9:19:06 AM1/6/16
to Neo4j
MATCH (n) DELETE DETACH n does not work. I get:

Invalid input 'n': expected whitespace, comment, node labels, MapLiteral, a parameter, a relationship pattern, '(', '.', '[', "=~", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',', LOAD CSV, START, MATCH, UNWIND, MERGE, CREATE, SET, DELETE, REMOVE, FOREACH, WITH, RETURN, UNION, ';' or end of input (line 1, column 25 (offset: 24))
"MATCH (n) DELETE DETACH n"

Michael Hunger

unread,
Jan 6, 2016, 11:03:20 AM1/6/16
to ne...@googlegroups.com
sorry, typo:

DETACH DELETE

Michael

Reply all
Reply to author
Forward
0 new messages