You would model those infected-by information relationships between the nodes, 
not as property containing a number.

Then you can use variable length paths to do long and also circular matches in 
the graph.

MATCH p=(n:Person {name:"Mina"})-[:INFECTED_BY*]->(m)
RETURN path,m

HTH

Michael

Am 06.01.2014 um 09:36 schrieb mina sh <[email protected]>:

> i want to get recursive query in neo4j with cypher.
> in dataset ,nodes has property "whom" that shows the node get infected by whom
> (for exmaple node[1] is infected by node[10].-> node(1).whom= 10 )
> i want to search the graph recurively from the node[1] to node [10] and 
> recursively so on to reach to the first node that has a whom=0 .
> 
> -- 
> 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/groups/opt_out.

-- 
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/groups/opt_out.

Reply via email to