Greetings,
I have the following question. Based on a similar graph (which for now we can safely assume is a tree). The relationships are one directional SPONSORS>
ones.
I find a difficulty understanding the difference between the following queries and why with larger sets of data they differ.
MATCH (p:User { userId: "3"})
CALL apoc.path.subgraphNodes(p, {
relationshipFilter: "SPONSORS>",
maxLevel: 3
})
YIELD node
RETURN node;
And the following query:
MATCH (p:User { userId: "3"})-[:SPONSORS*..3]->(child:User)
return child;
My issue arises from the fact that I cannot understand how the second query practically works, even after reading the related documentation here:
Neo4j match relationships with variable depth.
Ultimately, I am striving to find the way to optimally query every node "under"(since I'm practically using a Tree) a given node (i.e id = 3)
My expected results from both the queries would be to return nodes from 4 to 10 (disregarding order).
Thank you for the patience and I am sorry if anything is confusing, as this is my first post here :). All recommendations/advice are welcome