You're already doing the right, thing, I'm not sure I understand your actual problem?
If you just want to see the data of the transitive nodes in the network just return "c" MATCH (p:Computer)-[r:HAS*]->(c) WHERE p.name = 'MyComputer' RETURN c which exactly does this: "write a recursive function that traverses these HAS relations given a certain start point (in this case 'MyComputer') and for each node, read in the node properties." Perhaps you could clarify. Thanks, Michael On Thu, Oct 16, 2014 at 9:39 AM, Rubin <[email protected]> wrote: > Hi all, > > We're building an application with Neo4j that models component relations > in datacenter environments. To give you a quick idea, I've attached a > screenshot. > > We're using the REST interface of Neo4j and get a JSON result from the > following query (this query gives us the attached example graph): > > MATCH (p:Computer)-[r:HAS*]->(c) WHERE p.name = 'MyComputer' RETURN p,r,c > > We have a need to write a recursive function that traverses these HAS > relations given a certain start point (in this case 'MyComputer') and > for each node, read in the node properties. > > The above query gives us a JSON result which ends up in a Jackson > JsonNode object; we have a hard time trying to figure out the best way > to accomplish the above described recursive function and the feeling > creeps up that this can be done more efficiently. > > So the question is: given our constraints (ie. use REST interface, Java > as language, Neo4j database is remote) what is the best way to > accomplish recursive visitation of nodes in a finite set of HAS relations? > > Thanks in advance for any pointers on this! > > > Rubin Simons. > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
