Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-21-2020 02:37 AM
Hi to everyone!
Is there some neo4j algorithm that will return the k-hop neighborhood of a root/seed node?
Thanks!
Andreas
Solved! Go to Solution.
05-21-2020 05:45 AM
Hello @and.manousakis,
This cypher request allows to get all nodes in the neighborhood of the root node:
MATCH(root:Product{pid:123})-[r*..k]->(d)
RETURN DISTINCT(d)
If you want to have more information, this is the link to the doc: https://neo4j.com/docs/cypher-manual/current/clauses/match/#relationships-in-depth
Regards,
Cobra
05-21-2020 05:45 AM
Hello @and.manousakis,
This cypher request allows to get all nodes in the neighborhood of the root node:
MATCH(root:Product{pid:123})-[r*..k]->(d)
RETURN DISTINCT(d)
If you want to have more information, this is the link to the doc: https://neo4j.com/docs/cypher-manual/current/clauses/match/#relationships-in-depth
Regards,
Cobra
All the sessions of the conference are now available online