Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-07-2021 02:24 PM
Hello,
I got the dataset from my boss but nodes don't have labels. I want to find all pairs shortest path.
the dataset has about 10000 nodes.
Please check my code is right?
CALL gds.alpha.allShortestPaths.stream({
nodeProjection: '*',
relationshipProjection: {
ROAD: {
type: 'RELATED',
properties: 'length'
}
},
relationshipWeightProperty: 'length'
})
YIELD sourceNodeId, targetNodeId, distance
WITH sourceNodeId, targetNodeId, distance
WHERE gds.util.isFinite(distance) = true
MATCH (source) WHERE id(source) = sourceNodeId
MATCH (target) WHERE id(target) = targetNodeId
WITH source, target, distance WHERE source <> target
RETURN source.name AS source, target.name AS target, distance
ORDER BY distance DESC, source ASC, target ASC
LIMIT 10
please help me
All the sessions of the conference are now available online