Hi all, I am storing graphs in the catalogue and have an issue when using variable-length matching and it's sophisticated older sister apoc.path.expand...
The dataset is all UK companies and company officers and is very fragmented. There is a wide variety of clusters sizes. I want to be able to expand x hops.
In testing, if I write the relationshipsQuery path long-hand:
(o1:Officer)-[:IS_OFFICER]-(c:Company)-[:IS_OFFICER]-(o2:Officer)
I get the expected results
But if I try either variable-length matching (or apoc.path.expand.. but not shown in this example), using this relationshipQuery - which should be equivalent to the long-hand version (I think?)
MATCH p = (o1:Officer)-[:IS_OFFICER*..2]-(c:Company) WHERE o1.postcode STARTS WITH "BS6 6" UNWIND relationships(p) as rel WITH startNode(rel) as start, endNode(rel) as end RETURN id(start) AS source, id(end) AS target
The node count is the same but no relationships are stored??
Any help feedback very much appreciated,
Cheers,
Mike