title: Neo4j / Cypher / Traversing nodes having a specific label
body: <p>I'm using Neo4j Spatial plugin.</p>
  
  <p>Let's suppose this basic query:</p>
  
  <pre><code>START c = node:carslocation('withinDistance:[2.3725963,48.892067, 34.0]') 
  RETURN c
  </code></pre>
  
  <p>It returns all the cars within 34 km. </p>
  
  <p>What if I want to only retrieve <strong>race</strong> cars (using Labels). </p>
  
  <p>Without Spatial I would do: </p>
  
  <pre><code>MATCH (c:Race)
  RETURN c 
  </code></pre>
  
  <p>Now if I want <strong>all race cars within 34km</strong>, I would have:</p>
  
  <pre><code>START c = node:carslocation('withinDistance:[2.3725963,48.892067, 34.0]') 
  MATCH (c:Race)
  RETURN c
  </code></pre>
  
  <p>=> <code>Cannot add labels or properties on a node which is already bound</code>.<br>
  Indeed, <code>c</code> was already bound at the first line.</p>
  
  <p>I don't want to have to do this: </p>
  
  <pre><code>START c = node:carslocation('withinDistance:[2.3725963,48.892067, 34.0]') 
  MATCH (cr:Race)
  WHERE cr.id = c.id
  RETURN cr
  </code></pre>
  
  <p>It would force me to open all nodes, to check for the equality... => bad performance especially when the query gets more complex ( even if id is indexed).</p>
  
  <p>What could be an efficient solution?</p>
  
  <p><strong>UPDATE -------------------</strong></p>
  
  <p>Perhaps comparing nodes only is more efficient:</p>
  
  <pre><code>START c = node:carslocation('withinDistance:[2.3725963,48.892067, 34.0]') 
  MATCH (cr:Race)
  WHERE cr = c
  RETURN cr
  </code></pre>
  
  <p>Is it?</p>