Good point. Same would apply to relationship-based indexing, I suppose. In our use case, all of the entities that must be unique are maintained in a domain model that is managed by an in-memory hash, so we can enforce it prior to persistence.
I suppose that one brute force way would be to synchronize/pipeline writes that required a unique index so that the situation of uncommitted changes on another transaction could not occur. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Alexander Smirnov Sent: Friday, June 10, 2011 12:48 PM To: Neo4j user discussions Subject: Re: [Neo4j] unique indexes Check befor update could not help there, because Neo4j does not show uncommited changes to other transactions, so it's possible to store the same value in concurrent transactions. I also tried to figure out how to avoid duplicated values in database. Seems that it needed some locks on database objects. Can someone provide an example how to lock database objects properly ? On Fri, Jun 10, 2011 at 8:01 AM, Rick Bullotta <[email protected]> wrote: > If you need to, you could check the existence of a match prior to every > attempted add/insert/update. > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Matt C > Sent: Friday, June 10, 2011 10:25 AM > To: Neo4j user discussions > Subject: Re: [Neo4j] unique indexes > > An index that would enforce every value added to it be unique. I don't even > see support for that in Lucene, so, nevermind. Just something I'm used to > SQL handling for me. > > On Fri, Jun 10, 2011 at 1:05 AM, Peter Neubauer < > [email protected]> wrote: > >> Matt, >> what do you mean by unique indexes? >> >> Cheers, >> >> /peter neubauer >> >> GTalk: neubauer.peter >> Skype peter.neubauer >> Phone +46 704 106975 >> LinkedIn http://www.linkedin.com/in/neubauer >> Twitter http://twitter.com/peterneubauer >> >> http://www.neo4j.org - Your high performance graph database. >> http://startupbootcamp.org/ - Öresund - Innovation happens HERE. >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. >> >> >> >> On Fri, Jun 10, 2011 at 7:30 AM, Matt C <[email protected]> wrote: >> > Sorry if this is covered somewhere, I couldn't find it in the docs. I >> was >> > wondering if its possible to create unique indexes with the >> > LuceneIndexProvider? >> > >> > -Matt >> > _______________________________________________ >> > 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 > -- _________________ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

