Started a support discussion about this:

http://help.neo4j.org/discussions/questions/8-re-neo4j-unique-constaint-on-index

2011/7/14 Mattias Persson <[email protected]>

> Creating a support discussion for this.
>
>
> 2011/7/7 Michael Hunger <[email protected]>
>
>> I'd second that for 1.5
>>
>> Michael
>>
>> Sent from my iBrick4
>>
>>
>> Anfang der weitergeleiteten E‑Mail:
>>
>> *Von:* Aseem Kishore <[email protected]>
>> *Datum:* 7. Juli 2011 18:14:59 MESZ
>> *An:* Neo4j user discussions <[email protected]>
>> *Betreff:* *Re: [Neo4j] Unique Constaint on Index*
>> *Antwort an:* Neo4j user discussions <[email protected]>
>>
>> I'll strongly +1 that having a concept of "unique" index values should be
>> built into Neo4j. It's just too common of a requirement.
>>
>> Aseem
>>
>> On Thu, Jul 7, 2011 at 11:48 AM, etc3 <[email protected]> wrote:
>>
>> I'm new to this framework, is there an example that demonstrates removing
>> a
>>
>> non-existent property and how it would be used in this context?
>>
>>
>> Thanks
>>
>>
>> -----Original Message-----
>>
>> From: [email protected] [mailto:[email protected]]
>>
>> On
>>
>> Behalf Of Chris Gioran
>>
>> Sent: Thursday, July 07, 2011 11:04 AM
>>
>> To: Neo4j user discussions
>>
>> Subject: Re: [Neo4j] Unique Constaint on Index
>>
>>
>> Hi,
>>
>>
>> the ability to acquire locks cluster-wide exists, albeit in an ad hoc
>>
>> fashion. Grabbing a write lock on the node you want to ensure is uniquely
>>
>> indexed will ensure that the operations are serialized across all cluster
>>
>> members.
>>
>> The most simple way to get that lock currently is the (somewhat hackish
>> but
>>
>> entirely correct) removal of a non-existing property.
>>
>>
>> cheers,
>>
>> CG
>>
>>
>> On Thu, Jul 7, 2011 at 5:53 PM, etc3 <[email protected]> wrote:
>>
>> How do I ensure another request is not performing the same operation
>>
>> on another node in the cluster?
>>
>>
>>
>> -----Original Message-----
>>
>> From: <[email protected]>[email protected]
>>
>> [mailto:[email protected]] On Behalf Of Marko Rodriguez
>>
>> Sent: Thursday, July 07, 2011 10:35 AM
>>
>> To: Neo4j user discussions
>>
>> Subject: Re: [Neo4j] Unique Constaint on Index
>>
>>
>> Hi,
>>
>>
>> We are testing Neo4J and need to support unique emails across all
>>
>> users. Is this possible with the current API?
>>
>>
>> You can add such a constraint when updating the indices:
>>
>>
>> if(index.get('email', address).hasNext()) {
>>
>> throw new RuntimeException("There are two nodes that share the same
>>
>> email address."); } else {
>>
>> index.put('email', address, node);
>>
>> }
>>
>>
>> Marko.
>>
>>
>> http://markorodriguez.com
>>
>> _______________________________________________
>>
>> Neo4j mailing list
>>
>> [email protected]
>>
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>>
>> _______________________________________________
>>
>> Neo4j mailing list
>>
>> [email protected]
>>
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>>
>> _______________________________________________
>>
>> Neo4j mailing list
>>
>> [email protected]
>>
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>>
>> _______________________________________________
>>
>> Neo4j mailing list
>>
>> [email protected]
>>
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>>
>> _______________________________________________
>> Neo4j mailing list
>> [email protected]
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>>
>
>
> --
> Mattias Persson, [[email protected]]
> Hacker, Neo Technology
> www.neotechnology.com
>



-- 
Mattias Persson, [[email protected]]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to