Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-27-2021 09:27 AM
Using the default movies graph I want to compute:
MATCH p=(n:Movie {title: ["The Matrix Reloaded", "The Devil's Advocate"]})-[*]-()
RETURN p
LIMIT 25
However, I am not sure how to specify the title is in list operation.
Potentially: apoc.coll.contains(coll, value)
is useful? Lists - Neo4j Cypher Manual also mentions a pattern comprehension, but so far it is unclear for me how to apply the is in list operation.
Solved! Go to Solution.
04-27-2021 10:05 AM
Hello @georg.kf.heiler
MATCH (n:Movie)
WHERE n.title IN ["The Matrix Reloaded", "The Devil's Advocate"]
WITH n
MATCH p=(n)-[*]-()
RETURN p
LIMIT 25
Regards,
Cobra
04-27-2021 09:45 AM
MATCH p=(n:Movie)-[*]-()
WHERE ANY(item IN ["The Matrix Reloaded", "The Devil's Advocate"] WHERE item = n.title)
RETURN p
LIMIT 25
seems to be possible - but really slow.
Basically I want to have an all shortest paths - but the start point is a move from the list - however, the destination/end point must be a wildcard.
04-27-2021 10:05 AM
Hello @georg.kf.heiler
MATCH (n:Movie)
WHERE n.title IN ["The Matrix Reloaded", "The Devil's Advocate"]
WITH n
MATCH p=(n)-[*]-()
RETURN p
LIMIT 25
Regards,
Cobra
All the sessions of the conference are now available online