I have the following query. Although I gave maxDepth = 1, the run never ends. When I run this with BFS it instantly returns. Isn't it supposed to be fast with maxDepth = 1? (NOTE: I have a very large graph but I'm not sure if that's relevant when maxDepth = 1)
MATCH (a:Entity{name:'Steve Jobs'}), (d:Entity{name:'Apple Inc.'})
WITH id(a) AS source, [id(e)] AS targetNodes
CALL gds.dfs.stream('myGraph', {
sourceNode: source,
targetNodes: targetNodes,
maxDepth: 1
})
YIELD path
RETURN path
I assume it’s a typo, but your target node array has id(e), but your two matched nodes are bound to ‘a’ and ‘d’. Should it be id(d) instead?
Yes, sorry about that I can't edit the post and in my previous response I already gave it as 'd'.
Log says 'Finished' for DFS but neo4j browser stucks at loading screen. And even if I give a larger maxDepth like 10000, it finishes in a short time which is really unexpected this time. Also gds.beta.listprogress outputs 'n/a' for DFS progress.
And 'Steve Jobs' and 'Apple Inc.' are directly connected.
.
(original post was too short)