cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Run APOC algorithms on virtual (or projected) graph

Hello,

Is it possible to run APOC algorithms (e.g. Dijkstra) on a virtual (or projected) graph?

For instance, using the London graph example from this blog:
Create projected_graph as:

CALL gds.graph.create.cypher(
"projected_graph",
"MATCH (n:Node) RETURN id(n) AS id",
"MATCH (n)-[r:RELATED]->(m) RETURN id(n) AS source, id(m) AS target, toFloat(r.length) AS length"
)

And then use apoc.algo.dijkstra on this 'projected_graph' to perform a shortest path search with 'length' as weight.

Thanks, Ariel

1 REPLY 1

This is a great question, I hope somebody answers it