vgrabovets
10/1/2016 - 10:20 AM

recommender

recommender

CYPHER planner=cost
match (user:Users {user_id:"8"})-[:LIKED]->(:Movie)<-[:LIKED]-(other_user:Users)
match (other_user)-[:LIKED]->(movie:Movie)
with user, movie, count(movie) as num
where not (user)-[:LIKED]->(movie)
return movie.title, num
order by num desc
limit 10



CYPHER planner=cost
match (user:Users {user_id:"6"})-[:LIKED]->(:Movie)<-[:LIKED]-(other_user:Users)
with distinct other_user, user
match (other_user)-[:LIKED]->(movie:Movie)
with user, movie, count(movie) as num
where not ((user)-[:LIKED]->(movie) or (user)-[:DISLIKED]->(movie))
return movie.obj_id, movie.title, num
order by num desc
limit 10