Yes, it implies an index. And yes, you do need to drop it to add a unique
constraint.

Wes

On Sun, Dec 22, 2013 at 10:17 PM, Javad Karabi <[email protected]>wrote:

> looks like i need to drop the index first?
>
> just to be clear, if a constraint is added, does this imply an index?
> so, i dont need to worry about adding an index after i add a constraint?
>
>
> On Sunday, December 22, 2013 8:39:49 PM UTC-6, Javad Karabi wrote:
>>
>> Michael, i already have the id field indexed, does this not guarantee
>> uniqueness?
>>
>> I ask because the result of
>> CREATE CONSTRAINT ON (m:Member) ASSERT m.id IS UNIQUE
>> is
>> Already indexed :Member(id).
>>
>>
>> On Sunday, December 22, 2013 7:45:37 PM UTC-6, Michael Hunger wrote:
>>>
>>> try to create a unique constraint on a label and your "id" field.
>>>
>>> That will take an lock then to assure unique creation.
>>>
>>> Michael
>>>
>>> Am 23.12.2013 um 02:00 schrieb Javad Karabi <[email protected]>:
>>>
>>> if i have 2 cypher query posts to neo4j
>>>
>>> "MERGE a:Member( {id: {member_id} })" , member_id: 5
>>>
>>> "MERGE a:Member( {id: {member_id} })" , member_id: 5
>>>
>>> with both of these posts occurring simultaneously, is it possible to
>>> have 2 nodes created, instead of just the one?
>>> that is, if the first merge was interrupted halfway though, and had not
>>> completed yet, the second then creates a new one since it doesnt see the
>>> first...
>>> is this something that could potentially happen?
>>>
>>> on a related note, how would i enforce uniqueness on Member(id) ?
>>>
>>> --
>>> 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.

Reply via email to