Skip to content

Instantly share code, notes, and snippets.

@marbemac
Created June 12, 2012 16:33
Show Gist options
  • Save marbemac/2918568 to your computer and use it in GitHub Desktop.
Save marbemac/2918568 to your computer and use it in GitHub Desktop.
START a=node(1), b=node(2), c=node(3), d=node(4)
MATCH pa=shortestPath( a<-[:RELATED|TYPE_OF]->b ), pb=shortestPath( b<-[:RELATED|TYPE_OF]->c ) # etc ... Do I really need to make all of these combos...?
RETURN (SUM(affinities along the paths) / length(pa/pb/etc)) as association_strength # No idea how to do this part. I need to sum the "weight" property of the affinity connections along the paths discovered in the match clause, and then divide that sum by the length of the path
ORDER BY association_strength desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment