On Wed, Nov 2, 2011 at 12:26 PM, Andres Taylor < andres.tay...@neotechnology.com> wrote:
> On Wed, Nov 2, 2011 at 12:01 PM, Jacob Hansson < > jacob.hans...@neotechnology.com> wrote: > > > Is there a complex reason why this is the case, and is it going to stay > > this way? It feels a bit counter-intuitive.. > > > Cypher has no way of expressing uniqueness today. I think it should. I > think the current scheme is least surprising: it allows the foaf thing to > work without surprises: > > MATCH me-[:FRIEND]->friend<-[:FRIEND]-foaf > > This will not return yourself as a foaf. I think I would like to be able to > say: > > MATCH me-[:FRIEND]->friend<-[:FRIEND]-foaf WITH NO UNIQUENESS/NODE > UNIQUENESS/RELATIONSHIP UNIQUENESS/IDENTIFIER UNIQUENESS > Or something like that. Identifier uniqueness would be the default. It's a > difficult concept, so I want the default to be as non-surprising as > possible. > Makes sense. My two cents on this: The foaf example would have surprised me if it returned "me" the first time I ran it, but now, looking at the query, I'm actually surprised it does not. It would be cool to list some use cases, and try to determine which is the least surprising default. Also, the word "unique" could be confusing as well, since there could be lots of different nodes being referenced by the "me" identifier. Really, what you are saying is "Guarantee that any node referenced by this identifier is not referenced by any other". > > This is one of the things that keep me up at night. > Andrés > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user