I have specific node label named C . some of this this has multiple edges of same relationship "HAS_DEVICE" with specific node node D. so far I have tried variable length but counting those nodes is taking so much time . here is my query
Match(n:C)-[r:HAS_DEVICE*2..10]-(d:D) return count(n.IDENTITYID),d.DEVICEID as deviceid;
the query is taking huge time . My graph has 10,448,975 nodes and 11,038,864 relationship. I have put identityid as constraints . Is there any wrong of my code or am I something missing here. Kindly help me out
I was expecting output like this
n.Identityid. d.deviceid
3. xyzzy
2. fdfda
I am checking it :). but the variable length query gave me the actual picture of nodes which are connected with same relationship multiple times with other specific node. Actually I was happy with that but counting these nodes seems cumbersome to me any way checking your solution. I have got reply after a long time from you :)
@cobra I wanted to filter those nodes which have same relationship>=2 with d nodes. I tried this query before post but it shows unfiltered report.
like
deviceid. identityid
ererere. 1
here in your problem NEXT relationship is directed to multiple times in some specific node from other node . that specific node is my d node and others nodes are my C nodes, I wanted to count C nodes
so here I can limit my range in number. the brown nodes are device and red nodes are customer so I am trying to find out count of customers which are using same device with HAS_DEVICE relationship . you see there is many customer who are using same device. **I am wanting the direct 1 hop customers count from single devices those have >= 2 edges with customer **
@cobra I have managed a solution . I have counted all customer nodes which are connected with each device then export it as csv. After that I ran a python script to filter most connected customer with single device . It worked :). Thank you for your help