Ah this discussion is interesting, I want to join and throw in sonme idea too.
If a user can visit a place for multiple times. And if there are 100 user visit USA. So we should suggest top 10 only. Would traversing the graph be more efficient than normal database query? Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...! -----Original Message----- From: Aman <aman.6...@gmail.com> Sender: user-boun...@lists.neo4j.org Date: Sat, 18 Jun 2011 10:50:34 To: Neo4j user discussions<user@lists.neo4j.org> Reply-To: Neo4j user discussions <user@lists.neo4j.org> Subject: Re: [Neo4j] Generating suggestions in a Neo4j db Hi Jim, The way you mentioned, that will take care of these suggestions, thanks for the same. But here's a tougher problem.... If I have a database of 50k people, and I want to find friends based upon the places that those 50k people have visited (i.e. People who have visited same places as me should be suggested as friends to me), then how to to that... I've thought all that I could, but I always come up with something stupid... Any suggestions about this? On 6/18/11, Aman <aman.6...@gmail.com> wrote: > Hi Jim, > The way you mentioned, that will take care of these suggestions, > thanks for the same. But here's a tougher problem.... > If I have a database of 50k people, and I want to find friends based > upon the places that those 50k people have visited (i.e. People who > have visited same places as me should be suggested as friends to me), > then how to to that... I've thought all that I could, but I always > come up with something stupid... Any suggestions about this? > > On 6/18/11, Jim Webber <j...@neotechnology.com> wrote: >> Hi Aman, >> >> I'm puzzled. >> >> Why not >> >> Aman--HAS_VISITED-->USA >> Jim--HAS_VISITED-->India >> >> And if: >> >> Aman--FRIEND-OF-->Jim >> >> Then you just need to traverse from Aman following outgoing FRIEND_OF >> relationships to all your friends, and then traverse out their outgoing >> HAS_VISITED relationships to find places your friends have been. >> >> The general idiom with Neo4j is use indexes the find your start node >> (e.g. >> the Aman node in the above) then traverse from there. >> >> Jim >> >> _______________________________________________ >> Neo4j mailing list >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> > > > -- > Amandeep > +91-9878483857 > -- Amandeep +91-9878483857 _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user