title: Neo4j: get all relations between queried nodes
body: <p>I want to make a cypher query that do below tasks:</p>
  
  <ol>
  <li>there is a given start node, and I want to get all related nodes in 2 hops</li>
  <li>sort queried nodes by hops asc, and limit it with given number</li>
  <li>and get all relations between result of 1.</li>
  </ol>
  
  <p>I tried tons of queries, and I made below query for step 1, 2</p>
  
  <pre><code>MATCH path=((start {eid:12018})-[r:REAL_CALL*1..2]-(end))
  WITH start, end, path
  ORDER BY length(path) ASC
  RETURN start, collect(distinct end)[..10]
  </code></pre>
  
  <p>But when I try to get relationships in queried path with below query, it returns all relationships in the path :</p>
  
  <pre><code>MATCH path=((start {eid:12018})-[r:REAL_CALL*1..2]-(end))
  WITH start, end, path
  ORDER BY length(path) ASC
  RETURN start, collect(distinct end)[..10], relationships(path)
  </code></pre>
  
  <p>I think I have to match again with result of first match instead of get relationships from path directly, but all of my attempts have failed.</p>
  
  <p>How can I get all relationships between queried nodes?
  Any helps appreciate, thanks a lot.</p>