Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Created May 16, 2019 17:35
Show Gist options
  • Save vladbatushkov/63578a0f8eb833a99a110643e09bcb65 to your computer and use it in GitHub Desktop.
Save vladbatushkov/63578a0f8eb833a99a110643e09bcb65 to your computer and use it in GitHub Desktop.
Result of same keywords of moives.
MATCH (m1:Movie)-[s:SHARE]->(m2:Movie)
WITH apoc.coll.removeAll(s.keywords, ["about", "though", "their", "takes", "which", "around", "other", "makes", "films", "scene", "often", "while", "another", "after", "perphaps", "should" ]) as valids, m1.title as film1, m2.title as film2
WITH film1, film2, valids, size(valids) as total
WHERE total > 3
RETURN film1, film2, valids, total
ORDER BY total DESC
LIMIT 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment