Imagine I have a huge graph. All the relationships have this numerical property called 'weight'. I want to fetch a subgraph comprised of a specified central node (by id) and its neighbors connected to it by relationships with weight greater than, say, 0.9.
I was trying to use APOC, but apparently, there is not an out-of-the-box option to establish a condition on the relationships.
MATCH (n:Assay {assay_id: "9995-6"})
CALL apoc.path.subgraphAll(n, {
relationshipFilter: "LINK",
minLevel: 1,
maxLevel: 1
})
YIELD nodes
RETURN node,n, LIMIT 25
For example, I would want to add a line like so:
MATCH (n:Assay {assay_id: "9995-6"})
CALL apoc.path.subgraphAll(n, {
relationshipFilter: "LINK",
minLevel: 1,
maxLevel: 1,
r.weight > 0.9 #this line
})
YIELD nodes
RETURN node,n, LIMIT 25
But of course, that does not work. I hope there is a straightforward solution to this. Thank you.