# Shortest path algorithms in GDS lib do not work properly

hi ,
I use the Dijkstra Source-Target algorithm to find the weighted shortest path via the cypher code below.
However, the result still shows the unweighted shortest path even after I added the "relationshipWeightProperty" in my cypher "call" query. Please give some advise for how to get the weighted shortest path, thanks.
the link for data and code as below:

``````MATCH (source:Place {id:'Amsterdam'}),(target:Place {id:'London'})
YIELD nodeIds,costs
WITH [nodeId in nodeIds|gds.util.asNode(nodeId).id] AS nodeName,costs AS costs, size(nodeIds) AS siz
UNWIND range(0,siz-1) AS n
RETURN nodeName[n] AS city, costs[n] AS step
``````

path of result generated by code above is still "Amsterdam-Immingham-Doncaster-London" same as unweighted path. The weighted path should be "Amsterdam-Den Haag-Hoek van Holland-Felixstowe-Ipswich-Colchester-London". this example in the book is represented by algo lib but this lib is retired so I use the GDS lib to rewrite the example. It seems the GDS lib not work well

And for the latest version of Dijkstra Source-Target algorithm it's applied as directed.
So you'd configure to undirected first.

Here are 2 pieces of code to do that:

``````CALL gds.graph.create(
'g1',
'Place',
{
relationshipProperties: 'distance'
}
)
``````

Then run the algorithm:

``````MATCH (source:Place {id: "Amsterdam"}), (destination:Place {id: "London"})
CALL gds.shortestPath.dijkstra.stream('g1',{
sourceNode: source,
targetNode: destination,
relationshipWeightProperty: 'distance'
})
YIELD nodeIds, costs
WITH [nodeId in nodeIds|gds.util.asNode(nodeId).id] AS nodeName,costs AS costs, size(nodeIds) AS siz
UNWIND range(0,siz-1) AS n
RETURN nodeName[n] AS city, costs[n] AS step
``````

That's it.