Neo4j - match multiple nodes using identifiers

I need to get multiple nodes in Neo4j and I only have identifiers.

Is there a way to get nodes that have their ID in a given set in a single cypher request? Or do I need to call db for each ID?

I am using Neo4j 2.1.5

Thanks!

+6
source share
1 answer

You can combine inside an array.

MATCH (u:`User`) WHERE ID(u) IN [1, 2, 3] RETURN u 
+14
source

Source: https://habr.com/ru/post/976983/


All Articles