neo4j - Find friend that has the highest number of common friends.. and returning his/her friends that are not in your list -


i need find connected friend's friend node of cypher query.

in example below, given b, need query return "salad" node not "bacon" node. particular case, have picked node c (as opposed node a), connected friend. because b&c share friends. have picked friend of c not b's friend's list friend node (salad) can recommended.

enter image description here

given b, need cypher query return "salad" node in neo4j. per stefan's suggestion have added neo4j console data here. thanks.

i assume know id of node b , c beforehand.

start b=node(<id_of_b>), c=node(<id_of_c>) match c-[:likes]->stuff not(b-[:likes]->stuff) return stuff 

this should give list of items c likes not b not, aka "salad" node.

for future questions please consider setting data set on http://console.neo4j.org, makes question clearer.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -