I would like to add edges between nodes of distance 2 apart, and set a
weight property according to how many such paths of length 2 exists. I think a query like this is close, but isn't quite right:
Match path=((u1:User)-[:KNOWS]->(:User)-[:KNOWS]->(u2:User)) With u1, u2, Count(path) as weight Merge (u1)-[e:FILLEDIN]->(u2) Set e.weight=weight
This doesn't seem to do anything in my graph. What's the best way to do this?