title: Find bfs tree in Neo4j
body: <p>I new to Neo4j. I have a simple graph and I want to have all nodes which almost near(distance less than 5 for instance) to a single node. Also I want the path from the source to them.
  This can simply done by a single bfs from the source. 
  With the following cypher query :</p>
  
  <pre><code>    Match c=(sourceNode:Person {name:'Demi Moore'})-[relation*1..5]-(destNode)
      return c
      limit 10
  </code></pre>
  
  <p>The query returns all path with lenght&lt;=5 from the source but the destNode  will not be distinct. so the result can have multiple path to same dest node.</p>
  
  <p>With the following query:</p>
  
  <pre><code>    Match c=(sourceNode:Person {name:'Demi Moore'})-[relation*1..5]-(destNode)
      return distinct destnode
      limit 10
  </code></pre>
  
  <p>The query only returns the destNodes not the path. If I change the return clause to <code>return distinct destnode, c</code>  the query also will returns a row per path it finds!
  I know i can get the shortest path from source to every distinct destnode If find but it has performance issue. 
  The result can be found by a single bfs and I think any graph database have the tool by default, am I wrong?</p>