diff --git a/application/database/db.py b/application/database/db.py index ec4254ae8..503a8d491 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -427,7 +427,7 @@ def gap_analysis(self, name_1, name_2): """ OPTIONAL MATCH (BaseStandard:NeoStandard {name: $name1}) OPTIONAL MATCH (CompareStandard:NeoStandard {name: $name2}) - OPTIONAL MATCH p = allShortestPaths((BaseStandard)-[*..20]-(CompareStandard)) + OPTIONAL MATCH p = shortestPath((BaseStandard)-[*..20]-(CompareStandard)) WITH p WHERE length(p) > 1 AND ALL(n in NODES(p) WHERE (n:NeoCRE or n = BaseStandard or n = CompareStandard) AND NOT n.name in $denylist) RETURN p @@ -440,7 +440,7 @@ def gap_analysis(self, name_1, name_2): """ OPTIONAL MATCH (BaseStandard:NeoStandard {name: $name1}) OPTIONAL MATCH (CompareStandard:NeoStandard {name: $name2}) - OPTIONAL MATCH p = allShortestPaths((BaseStandard)-[:(LINKED_TO|CONTAINS)*..20]-(CompareStandard)) + OPTIONAL MATCH p = shortestPath((BaseStandard)-[:(LINKED_TO|CONTAINS)*..20]-(CompareStandard)) WITH p WHERE length(p) > 1 AND ALL(n in NODES(p) WHERE (n:NeoCRE or n = BaseStandard or n = CompareStandard) AND NOT n.name in $denylist) RETURN p