Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j cypher return all nodes where property matches any array element

Tags:

neo4j

cypher

This should be easy, I am overlooking something. I want to match a group of nodes and return all where the ID matches any of a group of given IDs. Something like this:

MATCH (b:`Band`)-[r:`something`]->(u:`SomethingElse`)
WHERE b.uuid IN ['1', '2', '3']
RETURN b

That returns the first node that matches. I want all that match. What am I missing?

like image 684
subvertallchris Avatar asked Oct 03 '14 19:10

subvertallchris


1 Answers

This worked. Leaving this up in case anyone else ever wants to know how to do it.

like image 130
subvertallchris Avatar answered Oct 06 '22 05:10

subvertallchris