Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-01-2021 03:35 AM
CREATE (n:Node {node_id : 'node-1'});
CREATE (n:Node {node_id : 'node-2'});
CREATE (n:Node {node_id : 'node-3'});
MATCH (s:Node {node_id: 'node-1'}), (d:Node {node_id: 'node-2'}) CREATE (s)-[:HAS_RELATION {relation_id: 'r1'}]->(d);
MATCH (s:Node {node_id: 'node-1'}), (d:Node {node_id: 'node-2'}) CREATE (s)-[:HAS_RELATION {relation_id: 'r2'}]->(d);
MATCH (s:Node {node_id: 'node-2'}), (d:Node {node_id: 'node-3'}) CREATE (s)-[:HAS_RELATION {relation_id: 'r1'}]->(d);
MATCH (s:Node {node_id: 'node-2'}), (d:Node {node_id: 'node-3'}) CREATE (s)-[:HAS_RELATION {relation_id: 'r2'}]->(d);
Searching for all the paths with relation_id: r1
(we're not interested in any other relations in the returned path)
MATCH p=(s:Node)-[r:HAS_RELATION*1..10]->(d:Node)
WHERE s.node_id = "node-1" AND ALL (r IN relationships(p) WHERE r.relation_id = 'r1')
RETURN DISTINCT p
Although the returned graph shows that it returns all paths, the result data only contains relations with relation_id: r1.
Is there any reason for this ? I mean since it might be misleading, is there any way to only show the returned paths in the result ?
Thanks
Solved! Go to Solution.
12-01-2021 07:47 AM
Yep, it's not so easy to found. You must go on "Browser settings" on left sidebar (the Gear icon), and deselect the checkbox "Connect result nodes" at the end of the panel.
12-01-2021 07:47 AM
Yep, it's not so easy to found. You must go on "Browser settings" on left sidebar (the Gear icon), and deselect the checkbox "Connect result nodes" at the end of the panel.
12-01-2021 12:49 PM
@giuseppe.villani Thanks for the help imo, it should have been disabled by default, since it could be misleading (what you see is not the actual result)
All the sessions of the conference are now available online