unable to delete node labels in neo4j

徘徊边缘 提交于 2019-12-06 11:50:15

So, you don't actually delete labels you remove them (e.g. remove m:Movie). delete is used to remove nodes and/or relationships from the database.

The following cypher example will match your movie node, remove the existing label, add a new one and return the node. When it is returned you can see that it has a different label.

match (m:Movie) 
remove m:Movie
set m:FavouriteMovie
return m

Check out the reference card neo4j.com/docs/stable/cypher-refcard/ and search for REMOVE.

Labels not deleting are often caused by un-removed indexes. For example, if you have an index personID on the Person Node Label

DROP INDEX ON :Person(personID)
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!