Hi everyone I have created a collaborative-filtering algorithm in opencypher (memgraph
). Although my coworker says that it would not scale to high demands is this the case? if so how would I make it more scalable
MATCH (user:User)-[:CLICKED_ON]->(p:Post)<-[:CLICKED_ON]-(otherUser:User)
WHERE user.username = $username AND p.timestamp >= datetime() - duration({months: 3})
WITH COLLECT(DISTINCT otherUser) AS others, COLLECT(DISTINCT p) AS sharedProds, user AS u
UNWIND others AS other
MATCH (other)-[:CLICKED_ON]->(recommended:Post)
WHERE NOT recommended IN sharedProds AND NOT (u)-[:VIEWED]->(recommended)
RETURN DISTINCT recommended.postId, count(DISTINCT other) as frequency
ORDER BY frequency DESC