Skip to content

fix syntax #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion documentation/movies.workspace.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,12 @@ To find a list of potential co-actors, run the following query:
----
MATCH (p:Person {name:"Tom Hanks"})-[:ACTED_IN]->(m)<-[:ACTED_IN]-(coActors),
(coActors)-[:ACTED_IN]->(m2)<-[:ACTED_IN]-(cocoActors)
WHERE NOT (p)-[:ACTED_IN]->()<-[:ACTED_IN]-(cocoActors) AND p <> cocoActors
WHERE NOT exists { (p)-[:ACTED_IN]->()<-[:ACTED_IN]-(cocoActors) } AND p <> cocoActors
RETURN cocoActors.name AS recommended, count(*) AS score ORDER BY score DESC
----



The `WHERE` part of the query ensures that you don't get actors who already worked with Tom Hanks and nor Tom Hanks himself.
The results are ordered by the number of co-occurrences they have in common.

Expand Down