First, I create multiple relationships between pairs of nodes to represent the jobs a Director held at a Company. When I check for duplicate relationships, result is zero.
MATCH (a:Director)-[r]->(b:Company)
with a, b, type(r) as tr, properties(r) as pr, count(properties(r)) as cpr
where cpr>1 and b.fraud=true
return sum(cpr-1) as numDuplicateRelationships
Then, I traverse the graph to set properties on Directors and Companies. When I check again for duplicate relationships, all pairs of nodes that have more than one relationship are now all duplicates. In other words, if a pair of nodes had 3 relationships, there are now 3 identical relationships.
I am at a loss why initially different relationships all become identical!
=====
Neo4j Browser version: 3.1.14
Neo4j Server version: [3.4.1] (community)
Traversing using cypher http endpoint
Checking duplicates with cypher browser
debug.log
[...]
2019-03-26 06:21:17.036+0000 INFO [o.n.k.i.s.c.CountsTracker] Rotated counts store at transaction 2607741 to [/var/lib/neo4j/data/databases/graph.db/neostore.counts.db.b], from [/var/lib/neo4j/data/databases/graph.db/neostore.counts.db.a].
2019-03-26 06:21:17.044+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint triggered by scheduler for tx count threshold @ txId: 2607741 checkpoint completed in 19ms
2019-03-26 06:21:17.044+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] Pruned log versions 21446-21446, last checkpoint was made in version 21448
2019-03-26 06:21:27.044+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint triggered by scheduler for tx count threshold @ txId: 2607744 checkpoint started...
2019-03-26 06:21:27.057+0000 INFO [o.n.k.i.s.c.CountsTracker] Rotated counts store at transaction 2607744 to [/var/lib/neo4j/data/databases/graph.db/neostore.counts.db.a], from [/var/lib/neo4j/data/databases/graph.db/neostore.counts.db.b].