7.9. Find friends based on similar tagging

Graph

cypher-peoplesimilaritytags-graph.txt.svg

To find people similar to me based on the taggings of their favorited items, one approach could be:

Query

START me=node:node_auto_index(name = "Joe")
MATCH me-[:favorite]->myFavorites-[:tagged]->tag<-[:tagged]-theirFavorites<-[:favorite]-people
WHERE NOT(me=people)
RETURN people.name as name, count(*) as similar_favs
ORDER BY similar_favs DESC

The query returns the list of possible friends ranked by them liking similar stuff that are not yet friends.

Result

namesimilar_favs
2 rows
0 ms

"Sara"

2

"Derrick"

1