graph - how to count the repetition of the relationships in neo4j -
i trying calculate number of relationships between 2 nodes repeated more 1 time. using merge
clause . so, there possibility calculate if relationships repeated more 1 time. graphically can not see because while using merge
clause relationships merge if nodes , relations same. in data repetitions exist. example, if node a
calls node b
, call relationship more 10 times. when use merge
clause appear 1 time avoid repetitions in graph. can count repetitions cypher query or not? in advance
if have (a)-[:calls]->(b)
way count number of calls relationships between , b be
match (a)-[r:calls]->(b) return count(r)
however, you're using merge
should create 1 calls
relation between , b.
if you're sure there multiple calls
relationships between , b either usage of merge
incorrect, or these relationships existed earlier before started using merge
.
either way, neo4j browser (post 2.2) show nice curved relationships between , b if more 1 exist, , query above confirm fact.
Comments
Post a Comment