Never mind, I figured it out by using 
AND NOT ((someone)<-[:friend]-(:people {profileID:12345})

Where 12345 is the profile of the user who is searching and whose friends 
should be excluded from the search. 

Cheers


On Friday, July 11, 2014 7:15:07 PM UTC+1, Anshuman Ghosh 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to