Hey Rubin

not sure I understand your question - you clearly are already aware of 
"variable length paths" (the * in the pattern). Typically you do provide an 
upper boundary to those paths (*..5 - or whatever value makes sense) to 
avoid combinatory explosions - but other than that... what seems to be the 
problem? Maybe we can have a chat? You have me on email already - so please 
reach out?

Cheers

Rik

On Thursday, October 16, 2014 9:39:31 AM UTC+2, Rubin Simons 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.

Reply via email to