I want to add weight in relationship property. Weight are counted from this code:
MATCH (n1)-[r1:NEXT]->(n2)
DELETE r1
RETURN n1, n2, apoc.create.vRelationship(n1, 'WEIGHT', {weight:count(r1)}, n2);
But the "WEIGHT" doesn't appear in the property of r1 How can I fix this?
I didn't worked with
apocso I answer your question with pure cypher:If you delete r1 relation it would create
WEIGHTrelation for everyNEXTrelation. For handling this problem you can removeNEXTrelation in another query after this one, unfortunately I don't know how merge these 2 query in one query :(. Hope someone help to improve this answer :).