Reputation: 55
I have an existing graph in Neo4j. I stored the event datetime in APOC in the node. I want to create relationships between nodes in time order. (First event)--(second event)--(third event) etc.
Is there a way to do this programmatically?
Upvotes: 0
Views: 49
Reputation: 30397
Yes, you can match on the nodes, order them by the event datetime, collect them, then use apoc.nodes.link()
to create the desired relationships between them.
Upvotes: 1