I have a database with approx 50k nodes. Then I import a test CSV file with a header and 7 data lines:
"Father","Mother"
"I000000","I000003"
"I000003","I000013"
"I000013","I000011"
"I000011","I000243"
"I000243","I000084"
"I000000","I000089"
"I000011","I000088"
with
LOAD CSV WITH HEADERS FROM 'file:///C:/Temp/Families.csv' AS line
MATCH (p1:Person), (p2:Person)
WHERE p1.GID = line.Father AND p2.GID = line.Mother
MERGE (p1)-[r:Marriage]-(p2);
This should create 7 bidirectional relationships which is exactly what it does. The resulting network is displayed with
MATCH (p1:Person)-[r]-(p2:Person)
RETURN r, p1, p2;
Everything looks perfect.
Then I run
MATCH path = (p1:Person)-[:Marriage*6]->(p2:Person)
RETURN path, p1, p2;
and get nothing back:
(no changes, no records)
Since I have bidirectional relationships, I feel the path between the nodes I000089 and I000084 should be returned since this path has exactly 6 edges.
So I run
MATCH path = (p1:Person)-[:Marriage*5]->(p2:Person)
RETURN path, p1, p2;
and get back the path between nodes I000000 and I000084. I would expect that the paths between nodes I000089 and I000088 resp I000089 and I000243 should also be returned since those two paths have also five edges.
I now run
MATCH path = (p1:Person)-[:Marriage*4]->(p2:Person)
RETURN path, p1, p2;
and get back the network as shown above with the exception of node I000089.
So it appears as if node I000089 is being ignored whenever I'm looking for a path though there is an edge between nodes I000089 and I000000. What's happening here?
Thanks for your comments!
Ulrich