cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Finding ALL Linked Nodes - Trouble with APOC

Hi!

I'm a bit of an amateur hack so please forgive me if this is a stupid question. I have done quite a bit of Googling, trial and error, documentation searching, and searching this forum but I'm still having trouble.

I'm working with a graph that represents a phone system with nodes for Directory Numbers (IBNDNs), individual phone buttons, and phones themselves. DNs have a bidirectional relationship with the buttons, and the buttons in turn have a bidirectional relationship with the phones. To save you from telecom tech speak, assume that if I change a DN, I must also change every associated button, and station, and then in turn, all other buttons on the station, and all the DNs associated to those, ad infinitum. Essentially, all my nodes are full dependent on each other, even if their relationships are several layers removed. I'm trying to find these communities of interdependency.

I used the query below based on some reading done on this forum and I was able to match a number, get all the associated buttons, all the stations associated to those buttons, and all the other buttons associated to those stations, but no other IBNDN nodes. I've tried with and without labelFilters, relationshipFilters, maxLimits, etc. as well as with an empty set as shown below, all to no avail. Is using APOC's subgraphNodes the right way to do this or am I missing something obvious in my CYPHER/neo4j/graph ignorance?

MATCH (dn:IBNDN {DN:"phoneNumberDigitsHere"})
CALL apoc.path.subgraphNodes(dn,{}) YIELD node
RETURN node

I'm very grateful for any advice anyone can provide on this topic! Thank you!

0 REPLIES 0