[Neo] Managing nodes with same values for a property

Sumanth Thikka sumanth at truesparrow.com
Wed Feb 24 11:21:58 CET 2010


Hi Mario,

Thanks for your reply.

My requirement is to avoid duplicates. For that, do we need to find the
nodes with the same value and avoid inserting, as it is mentioned or any
alternative(optimized) ways known to do this?

Thanks,
Sumanth


On Wed, Feb 24, 2010 at 2:24 PM, <mario.alemi at gmail.com> wrote:

> Hi Sumanth,
>
> Exactly like you would do for a real person, I'd say. Either you accept to
> get back two nodes (in my case I often want all the nodes with
> getProperty("type", "Customer") ), and then you iterate over them etc, or
> you set up a simple Id as explained in
> http://wiki.neo4j.org/content/Design_Guide#A_simple_Id_Generator.
>
> Hope it will help.
>
> Cheers
> M
> --
> Mario Alemi
> http://github.com/malemi/org.strabil
>
> On Wed, Feb 24, 2010 at 6:40 AM, Sumanth Thikka <sumanth at truesparrow.com
> >wrote:
>
> > Hi,
> >
> > A clarification regarding the properties of nodes.
> > If I am not wrong two nodes can have same value for similar property.
> > For example:
> >         node1.setProperty("name", "Sumanth"),
> >         node2.setProperty("name", "Sumanth") is valid.
> >  node1 and node2 have same value "Sumanth" for the property "name".
> >
> > My doubt is, how do we distinguish these nodes? Do we need to check if
> > there
> > already exists any node with the similar property value in Lucene(if one
> > uses lucene) before creating?
> >
> > Thank you,
> > T.Sumanth
> > _______________________________________________
> > Neo mailing list
> > User at lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> _______________________________________________
> Neo mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>


More information about the User mailing list