【发布时间】:2014-03-04 16:58:41
【问题描述】:
如何使用 Cypher 查询向现有节点添加标签?
【问题讨论】:
如何使用 Cypher 查询向现有节点添加标签?
【问题讨论】:
在参考文档中,请参阅http://docs.neo4j.org/chunked/stable/query-set.html#set-set-a-label-on-a-node,您需要使用set 为现有节点添加标签:
match (n {id:desired-id})
set n :newLabel
return n
【讨论】:
match (n:ExistingLabel) set n :NewLabel。现有标签不会被删除。
match (n:OldLabel) remove n:OldLabel