I am going through the apoc.path.subgraphAll - APOC Documentation (neo4j.com) webpage. Its is pretty good, but a question (confusion) remains. maybe someone here could explain.
using the example graph I present this apoc command.
Joe is on the terminator node list.. so.. why do we not terminate on Joe and progress to Mark? Shouldn't we Stop at Joe, or any of the other terminating nodes? Why do we progress to Mark? thanks guys.
here, let me give you the code to make it easier..
MATCH (p:Person {name: "Alicia"})
MATCH (terminator:Person)
WHERE terminator.name IN ["Mark", "Joe", "Zhen", "Rik"]
WITH p, collect(terminator) AS terminatorNodes
CALL apoc.path.subgraphAll(p, {
relationshipFilter: "FOLLOWS>|KNOWS",
minLevel: 0,
maxLevel: 3,
terminatorNodes: terminatorNodes
})
YIELD nodes, relationships
RETURN nodes, relationships, p;