Reputation: 103
Using Neo 2.0 through REST API /cypher I'm trying to build a rooted tree like structure.
I currently have an indexed start node, I want to attach a unique path of nodes which may already exist. How can I get cypher to create and set or just update if its already in the database but missing certain properties.
Upvotes: 1
Views: 1974
Reputation: 12095
I have the same issue currently. I'm looking into CREATE UNIQUE
might be what you are after.
http://neo4j.com/docs/stable/query-create-unique.html
edited: actually I think CREATE UNIQUE
might be deprecated.
Upvotes: 0
Reputation: 39915
Cypher's MERGE
command does this, see http://docs.neo4j.org/chunked/milestone/query-merge.html.
Upvotes: 1