Cypher: getting start/end node of relationship #503

Open
Bouncner opened this Issue Feb 5, 2013 · 1 comment

Projects

None yet

2 participants

Bouncner commented Feb 5, 2013

Hi,

I'd like to have the ability to easily get the start or end note of a relationship in Cypher. I have certain key information about a relationships, which are many (in my case tens thousands) and which all have the same start node.
Example:
start r=rel:transactions(sender_address='KEY')
match n-[r]->()
return n limit 1

This query apparently first gets the list of all qualifying relationships and then outputs the first hit, which is quite slow.

A solution like this would be great:
start r=rel:transactions(sender_address='KEY')
return startNode(r) / return endNode(r)

Contributor
freeeve commented Feb 23, 2013

Duplicate to #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment