Delete property from Neo4j graph

What version of Neo4j are you using? Since Neo4j 2.0 (I'm not sure what milestone exactly, tried it with M03), properties are not "deleted" anymore but "removed":

START n=node(1)
REMOVE n.property
RETURN n

Should work with Neo4j 2.x.

This is also reflected in the documentation. On the right side of the page (perhaps after some loading time) you have a pull-down menu for choosing your Neo4j version. When you go to the DELETE documentation and choose the 2.0.0-M03 milestone, you will notice that the "Delete a property" menu point disappears (link to the M03 documentation on DELETE: http://docs.neo4j.org/chunked/2.0.0-M03/query-delete.html).

Instead, the documentation for 2.0.0-M03 on REMOVE (here: http://docs.neo4j.org/chunked/2.0.0-M03/query-remove.html) does now list the "Remove a property" section.


Just another example.

For Neo4j 3.0, given a node with property keys, name and age, to delete the age property is also valid:

Create the node:

CREATE (n {name:'Andres', age:25}) return n

Delete the property key age:

MATCH (andres { name: 'Andres' }) REMOVE andres.age RETURN andres

From Neo4j 3.0 documentation https://neo4j.com/docs/developer-manual/current/cypher/#query-remove

Tags:

Neo4J