[Neo4j] Recommendation based on "likes"
the_name_i_chose_first at yahoo.com
Sat Jul 24 15:14:26 CEST 2010
It's a fairly typical recommendation scenario: a user is looking at an item
and gets suggestions for other items based on the number of users that like
this item liking those other items also.
So, I'm trying to implement this using Neo4j. Obviously, the graph contains
user nodes and item nodes connected by the "likes" relationship. Currently,
I'm not aware of any direct way to count in Neo, so I was thinking of
implementing this requirement as follows (in pseudo code):
*have a hashmap to store count per item (<itemId, count>)
*start from the item the user is looking at
*traverse "likes" relationships, in both directions, breath-first, 2 levels
*for every item node encountered, increment the count for that node
It is vital for this algorithm to be as fast as possible, so I'm asking if
there's any better way to implement it? Also, do you think it would work
faster in Neo compared to a traditional RDbMS (with a user-table, item-table
and an interconnecting table)?
Thanks for any advice :)
View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Recommendation-based-on-likes-tp992069p992069.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
More information about the User