title: How to avoid duplications return distinct nodes and the relation ship using neo4j
body: <p>I would like to return for a given node-id related nodes and their relationships props</p>
  
  <p>For example:
  <code>-&gt;</code> defines a bi direction relationship with property timestamp</p>
  
  <pre><code>1234-&gt;777
  777-&gt;1234
  1234-&gt;999
  999-&gt;1234
  1234-&gt;888
  888-&gt;1234
  </code></pre>
  
  <p>1234,777,888,999 are node-ids</p>
  
  <p>When I execute this:</p>
  
  <pre><code>    final PreparedStatement ps = conn.prepareStatement("start a = node(1234) match (a)-[k:nearby*]-&gt;(b) where a&lt;&gt;b return DISTINCT b, k");        
      ResultSet rs = ps.executeQuery();
      while (rs.next()) {
           Map result = (Map&lt;String, Object&gt;) rs.getObject("b");     
          System.out.println(result.toString());
      }
  
  } catch (SQLException e) {
      e.printStackTrace();
      logger.error("Error returning userId=" + userIdInput, e);
  }
  return null;
  </code></pre>
  
  <p>}</p>
  
  <p>I get:</p>
  
  <pre><code>{userId=777}
  {userId=999}
  {userId=888}
  {userId=888}
  {userId=999}
  {userId=999}
  {userId=777}
  {userId=888}
  {userId=888}
  {userId=777}
  {userId=888}
  {userId=777}
  {userId=999}
  {userId=999}
  {userId=777}
  </code></pre>
  
  <ol>
  <li>How I do get distinct results only (777,888,999)</li>
  <li>How to retrieve the relationship props of 1234 to the dest node? I expect to get the <strong>timestamp</strong> prop which defined on each relationship</li>
  </ol>
  
  <p>Thank you,
  ray.</p>