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.

Node depth (DFS/BFS)

Hi all,

My question is very simple : Is there anyway to obtain the node depths from the results produced by BFS/DFS algorithms.

I appears that these algos only produce the path they used to visit the graph.

Thank you in advanvce

Best,

Augustin

1 ACCEPTED SOLUTION

ameyasoft
Graph Maven

Use apoc.path.spanningTree with bfs filter setting to 'false' to get DFS results. Default value for bfs is 'true' and thus gives BFS results.

View solution in original post

1 REPLY 1

ameyasoft
Graph Maven

Use apoc.path.spanningTree with bfs filter setting to 'false' to get DFS results. Default value for bfs is 'true' and thus gives BFS results.