MATCH (something:things)<-[r2:likes]-(someone:people) WHERE something.name = "football" MATCH (me:people {name:"me"}) where not (me)-[:friend]->(someone) RETURN someone, something
On Fri, Jul 11, 2014 at 8:15 PM, Anshuman Ghosh <anshuman...@gmail.com> wrote: > Dear All, > > Some background: > > I have "people" nodes and "things" nodes. People nodes have personID > property and are connected with "friends" relationships. People and things > are connected by "likes" relationships (think Facebook). The query is run > by a person, search for others who like a certain thing say football. > > So my query is like this: > > MATCH (something:things)<-[r2:likes]-(someone:people) > WHERE something.name = "football" > RETURN someone, something > > > Now I need to do something more, basically the person searching for > "football" should see people who like "football" but who are not his > "friends". The intent is to find new people with common like and hence must > exclude friends. We know the personID of the person running this search. > > How do we write this query? > > Any help will be much appreciated! > > Cheers, > Anshuman > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.