Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-09-2021 12:12 AM
We can use patterns to search a subgraph like this:
MATCH(a:Person{id:1})-[:Knows*1..]->(b:Person)
However, I find it takes too long when the subgraph is large. Therefore I use apoc procedure:
MATCH(a:Person{id:1})
CALL apoc.path.subgraphNodes(p,{
relationshipFilter: "Knows>",
minLevel:1
})
YIELD node
return node.name as name.
It runs much faster ! The minLevel of the node is 1. The thing is I want to get the actual level of each node returned.
Anyone can help me? Thanks!
All the sessions of the conference are now available online