7
votes

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?

1
Looks good to me (and verified in the console). Checked all the silly things?JohnMark13
I... swear to god, I tried it a million times with a million variations and it didn't work until now.subvertallchris
Note that leaving a trailing comma in the list expression leads to the somewhat unhelpful syntax error: Invalid Input ']': expected whitespace, comment or an expression (Encountered in Neo4j 4.1.1)Oliver Sieweke

1 Answers

6
votes

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