Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cypher q: function to get start/end nodes of relationships?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aseem Kishore  
View profile  
 More options Oct 13 2012, 10:44 am
From: Aseem Kishore <aseem.kish...@gmail.com>
Date: Sat, 13 Oct 2012 10:43:46 -0400
Local: Sat, Oct 13 2012 10:43 am
Subject: Cypher q: function to get start/end nodes of relationships?

Just like you can dynamically WHERE on the type of a relationship, I
thought there was a way to dynamically WHERE on the direction as well -- by
comparing the start and end nodes of a relationship.

But neither START(rel) / END(rel) nor rel.start / rel.end work for me, and
neither on 1.6 nor on 1.8/9 (whatever's on console.neo4j.org). And looking
through the docs, I can't find any mention of these functions.

Is this not implemented yet and my memory was only of a discussion /
feature request? Or is it some other name? Thanks!

Aseem


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wes Freeman  
View profile  
 More options Oct 13 2012, 10:51 am
From: Wes Freeman <freeman....@gmail.com>
Date: Sat, 13 Oct 2012 10:50:42 -0400
Local: Sat, Oct 13 2012 10:50 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

There is a feature request for that, I think:
https://github.com/neo4j/community/issues/693

On Sat, Oct 13, 2012 at 10:43 AM, Aseem Kishore <aseem.kish...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 13 2012, 10:53 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sat, 13 Oct 2012 16:52:47 +0200
Local: Sat, Oct 13 2012 10:52 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

There is a feature request for that: https://github.com/neo4j/community/issues/693

Also treating relationships as a short path would be a nice thing.
so one can do nodes(r). or head(nodes(r)) tail(nodes(r)).

Michael

Am 13.10.2012 um 16:43 schrieb Aseem Kishore:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aseem Kishore  
View profile  
 More options Oct 13 2012, 10:59 am
From: Aseem Kishore <aseem.kish...@gmail.com>
Date: Sat, 13 Oct 2012 10:59:06 -0400
Local: Sat, Oct 13 2012 10:59 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

Ah cool, thanks guys.

It occurred to me that in the meantime, you could use a pattern WHERE:

MATCH (a) -[r:FOLLOWS]- (b)
WHERE (a) -[r]-> (b)

Cool, at least that's possible. Were pattern WHEREs added in 1.7?

Aseem

On Sat, Oct 13, 2012 at 10:52 AM, Michael Hunger <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andres Taylor  
View profile  
 More options Oct 13 2012, 11:20 am
From: Andres Taylor <andres.tay...@neotechnology.com>
Date: Sat, 13 Oct 2012 17:20:39 +0200
Local: Sat, Oct 13 2012 11:20 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

On Sat, Oct 13, 2012 at 4:59 PM, Aseem Kishore <aseem.kish...@gmail.com>wrote:

> Ah cool, thanks guys.

> It occurred to me that in the meantime, you could use a pattern WHERE:

> MATCH (a) -[r:FOLLOWS]- (b)
> WHERE (a) -[r]-> (b)

Hehe... Didn't realise that. Cool! :)

> Cool, at least that's possible. Were pattern WHEREs added in 1.7?

 No, they made it in in 1.8.

Andrés


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aseem Kishore  
View profile  
 More options Oct 13 2012, 11:22 am
From: Aseem Kishore <aseem.kish...@gmail.com>
Date: Sat, 13 Oct 2012 11:22:34 -0400
Local: Sat, Oct 13 2012 11:22 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

Thanks Andrés!

On Sat, Oct 13, 2012 at 11:20 AM, Andres Taylor <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 13 2012, 11:43 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sat, 13 Oct 2012 17:43:09 +0200
Local: Sat, Oct 13 2012 11:43 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

actually you can even use

> MATCH p = (a) -[r:FOLLOWS]- (b)
> WHERE a = head(nodes(p))

Michael

Am 13.10.2012 um 16:59 schrieb Aseem Kishore:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andres Taylor  
View profile  
 More options Oct 13 2012, 11:48 am
From: Andres Taylor <andres.tay...@neotechnology.com>
Date: Sat, 13 Oct 2012 17:48:20 +0200
Local: Sat, Oct 13 2012 11:48 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

On Sat, Oct 13, 2012 at 5:43 PM, Michael Hunger <

michael.hun...@neotechnology.com> wrote:
> actually you can even use

> MATCH p = (a) -[r:FOLLOWS]- (b)
> WHERE a = head(nodes(p))

Sorry amigo, but that doesn't work. The path always follows the pattern you
have described - in this pattern, a will _always_ be a the head of p.

Andrés


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 13 2012, 12:13 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sat, 13 Oct 2012 18:13:51 +0200
Local: Sat, Oct 13 2012 12:13 pm
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

Sure I know :)

Was just demonstrating a "true" case

Am 13.10.2012 um 17:48 schrieb Andres Taylor:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aseem Kishore  
View profile   Translate to Translated (View Original)
 More options Oct 13 2012, 8:35 pm
From: Aseem Kishore <aseem.kish...@gmail.com>
Date: Sat, 13 Oct 2012 20:35:22 -0400
Local: Sat, Oct 13 2012 8:35 pm
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

Ah, in my case at least, I'm interested in both directions -- hence not
specifying a direction in MATCH. I'm having trouble imagining a case where
you *wouldn't* be interested in both directions if you wanted to WHERE on
the direction.

(In my case, my WHERE looks something like (direction in AND foo) OR
(direction out AND bar).)

Aseem

On Sat, Oct 13, 2012 at 12:13 PM, Michael Hunger <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wes Freeman  
View profile  
 More options Oct 14 2012, 6:11 am
From: Wes Freeman <freeman....@gmail.com>
Date: Sun, 14 Oct 2012 06:11:07 -0400
Local: Sun, Oct 14 2012 6:11 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

Another use case for this is something like this, match both directions
where one direction or foo:
http://stackoverflow.com/questions/12814038/neo4j-cypher-query-filter...

Wes

On Sat, Oct 13, 2012 at 8:35 PM, Aseem Kishore <aseem.kish...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Oct 14 2012, 9:13 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Sun, 14 Oct 2012 15:13:03 +0200
Local: Sun, Oct 14 2012 9:13 am
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?

Agreed Wes,
Looks like a very useful addition.

On Sunday, October 14, 2012, Wes Freeman <freeman....@gmail.com> wrote:
> Another use case for this is something like this, match both directions

where one direction or foo:

http://stackoverflow.com/questions/12814038/neo4j-cypher-query-filter...

> Wes

> On Sat, Oct 13, 2012 at 8:35 PM, Aseem Kishore <aseem.kish...@gmail.com>
wrote:

>> Ah, in my case at least, I'm interested in both directions -- hence not

specifying a direction in MATCH. I'm having trouble imagining a case where
you *wouldn't* be interested in both directions if you wanted to WHERE on
the direction.
>> (In my case, my WHERE looks something like (direction in AND foo) OR

(direction out AND bar).)

you have described - in this pattern, a will _always_ be a the head of p.

--

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.8 GA -
http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »