I need to retrieve multiple nodes in Neo4j and I only have there IDs.
Is there a way to retrieve nodes that have their ID in the given set in one cypher query ? Or do I have to call the db for each ID ?
I'm using Neo4j 2.1.5
Thanks !
You can change the nodes associated with a label but you can't change the type of a relationship. Conceptually, if you take your chicken out of one coop and put it in another you haven't altered the substance of the chicken.
To create a relationship between two nodes, we first get the two nodes. Once the nodes are loaded, we simply create a relationship between them. The created relationship is returned by the query.
Return all elements When you want to return all nodes, relationships and paths found in a query, you can use the * symbol.
The MATCH clause allows you to specify the patterns Neo4j will search for in the database. This is the primary way of getting data into the current set of bindings. It is worth reading up more on the specification of the patterns themselves in Patterns.
You can match within an Array.
MATCH (u:`User`) WHERE ID(u) IN [1, 2, 3] RETURN u
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With