I have the following
MATCH (a: node)
MATCH (b: node)
MERGE (a) -[c:connect]-> (b)
on match set c.packets_transmitted = 200,
c.packets_recieved =350
I want to update the properties without duplicating the relationship which is already exist. Now whenever I run the cypher, the relationship between the nodes connect duplicates. What should I do?
Note: below is the cypher I used to create the relationship connect
MATCH (a:node), (b:node)
WHERE a.name = sw1 AND b.name = sw2
merge (a)-[:connect {packets_transmitted:0,packets_recieved:0}]->(b)