Sure; Cypher has this: http://docs.neo4j.org/chunked/stable/query-create-unique.html#_create_unique_nodes
That is also backed by an index - how else would it know if there were duplicates. I don't get what you mean by involving a path. You _can_ create single, unattached nodes that are unique according to an index of key/ value pairs. On Thu, Dec 19, 2013 at 12:26 PM, Shahar Taite <[email protected]>wrote: > ok so if i understand correctly it's not possible via the node path > without indexing... > but what about plain cypher? > can't i create a unique node without mentioning a path? it worked with a > path... > > > On Thursday, December 19, 2013 12:10:48 PM UTC+2, Lasse Westh-Nielsen > wrote: > >> Uniqueness only applies to indexes, so you need to tweak that url: >> http://docs.neo4j.org/chunked/stable/rest-api- >> unique-indexes.html#rest-api-get-or-create-unique-node-create >> >> >> >> >> On Thu, Dec 19, 2013 at 11:03 AM, Shahar Taite <[email protected]>wrote: >> >>> I've tried this as well, >>> however i don't use an ad hoc REST path for each node type. >>> i just send it to http://localhost:7474/db/data/node with all of the >>> properties. >>> i've just tried http://localhost:7474/db/data/node?*uniqueness=get_or_create >>> *but this still creates a new node everytime. >>> do i need to setup something for this to work? >>> thanks >>> >>> >>> On Thursday, December 19, 2013 9:52:13 AM UTC+2, Peter Neubauer wrote: >>> >>>> It's new to 2.0. For 1.9, use unique index lookup, see >>>> http://docs.neo4j.org/chunked/milestone/rest-api-unique-indexes.htmlwhich >>>> should work. >>>> >>>> /peter >>>> >>>> (snt)-[:frm]->(phn) >>>> On Dec 19, 2013 7:55 AM, "Shahar Taite" <[email protected]> wrote: >>>> >>>>> is this a 2.0 feature? i can't get this to work on 1.9...any solution >>>>> for 1.9? >>>>> thanks >>>>> >>>>> On Wednesday, December 18, 2013 2:27:28 PM UTC+2, Michael Hunger wrote: >>>>>> >>>>>> Use MERGE for that: http://docs.neo4j.org/ch >>>>>> unked/milestone/query-merge.html >>>>>> Am 18.12.2013 um 13:09 schrieb Shahar Taite <[email protected]>: >>>>>> >>>>>> Hey, >>>>>> i'm trying to create a unique node without starting at a certain >>>>>> point or matching a path. just creating a node if it doesn't exist(having >>>>>> the exact same properties) >>>>>> i've noticed something like create node{Type:"root"} >>>>>> would work, however create unique node{Type:"root"} won't >>>>>> work. >>>>>> any advice? >>>>>> thanks >>>>>> >>>>>> -- >>>>>> 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 [email protected]. >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>>> >>>>>> -- >>>>> 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 [email protected]. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> -- >>> 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 [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> (Neo Technology)<-[:WORK_FOR]-(I)-[:DEVELOP]->(Neo4j) >> > -- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- (Neo Technology)<-[:WORK_FOR]-(I)-[:DEVELOP]->(Neo4j) -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
