I need to collapse two nodes to a one node. I have gone this far "below" but I could not achieve what i want.
For example I want to collapse "guy" node and "love" node to a new node preserving the path.
I need to collapse two nodes to a one node. I have gone this far "below" but I could not achieve what i want.
For example I want to collapse "guy" node and "love" node to a new node preserving the path.
There is a procedure in APOC for that : apoc.refactor.mergeNodes
Example :
MATCH (f:Node {value:'Guy'}), (b:Node {value:'Love'})
WITH * LIMIT 1
CALL apoc.refactor.mergeNodes([f,b])
YIELD node RETURN node
Try creating a new node with the properties you desire and then remove the nodes(guy and love) by using DETACH DELETE.