Message from discussion
Cypher q: function to get start/end nodes of relationships?
Received: by 10.14.215.132 with SMTP id e4mr9457791eep.3.1350220389861;
Sun, 14 Oct 2012 06:13:09 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.14.194.70 with SMTP id l46ls2401467een.9.gmail; Sun, 14 Oct
2012 06:13:03 -0700 (PDT)
Received: by 10.14.210.133 with SMTP id u5mr9453848eeo.2.1350220383792;
Sun, 14 Oct 2012 06:13:03 -0700 (PDT)
Received: by 10.14.210.133 with SMTP id u5mr9453847eeo.2.1350220383769;
Sun, 14 Oct 2012 06:13:03 -0700 (PDT)
Return-Path: <neubauer.pe...@gmail.com>
Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43])
by gmr-mx.google.com with ESMTPS id d5si1178416eep.0.2012.10.14.06.13.03
(version=TLSv1/SSLv3 cipher=OTHER);
Sun, 14 Oct 2012 06:13:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of neubauer.pe...@gmail.com designates 74.125.83.43 as permitted sender) client-ip=74.125.83.43;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of neubauer.pe...@gmail.com designates 74.125.83.43 as permitted sender) smtp.mail=neubauer.pe...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-ee0-f43.google.com with SMTP id c13so2601478eek.30
for <neo4j@googlegroups.com>; Sun, 14 Oct 2012 06:13:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:sender:in-reply-to:references:date
:x-google-sender-auth:message-id:subject:from:to:content-type;
bh=AKORQ0SVEiMdl9NOj1Eemfv/lxAA9897zj5AZ4B48pA=;
b=JRjr54PCFZVHCJgFs4eWVYj3SMyVBXrf6JHUSehFJ46u9rEiIb2jxhFYWL7D+G26IC
sgZIrix2IseaYIJDjWJ2jsI5hJmgG3xCjLcEhkPMuWX4MMmLqK9ODLOekRKiB+p84Hhg
WJ4H0d1Go0jwKYnbQhAHapKCKNptqGBo537ObHvs8YcJPh2PRNuXhEg8kqn4mQWx77O8
w2iXYjlxZhF2/uoYsx2F8ZBIKESXEnQnpbgfeOfBZSJH90M4QLt2s6gm0+XmDe94QZYX
VXbjbiWI7NwOM/azRdq6IpL4IgZjCvgpIX0VOTWTsvXjzcjnaPFLwI1jhWnw/uSUoDHk
O+Uw==
MIME-Version: 1.0
Received: by 10.14.207.5 with SMTP id m5mr12477851eeo.22.1350220383627; Sun,
14 Oct 2012 06:13:03 -0700 (PDT)
Sender: neubauer.pe...@gmail.com
Received: by 10.14.37.198 with HTTP; Sun, 14 Oct 2012 06:13:03 -0700 (PDT)
In-Reply-To: <CAAOkgHNNn_V3vrSZ=SGBLVrDHyxmjRjctpRdA+bTD5-7EVC...@mail.gmail.com>
References: <CAETHeii3PXb3bPNR0K7ueKQ3nEOzcpED+1x1oE_rjezCLgH...@mail.gmail.com>
<97F314E0-D783-4972-9F08-C638CDFE9...@neotechnology.com>
<CAETHeijsqWvjc1wnyCrDzt=ktBWTyJgz4Eddq8X9+KCHjVn...@mail.gmail.com>
<74514D07-BF5C-4396-8A88-B1DA6235C...@neotechnology.com>
<CAHKVbKKpHzmidpwpUSU8Mac38HPg+koapXKW=+OLNOK=NSc...@mail.gmail.com>
<6F285148-FF73-46F9-A1E1-56663787F...@neotechnology.com>
<CAETHeijkD_b7=hNsgqr37qxV1WgXAZfaZun+z6N1yn97TL0...@mail.gmail.com>
<CAAOkgHNNn_V3vrSZ=SGBLVrDHyxmjRjctpRdA+bTD5-7EVC...@mail.gmail.com>
Date: Sun, 14 Oct 2012 15:13:03 +0200
Message-ID: <CAF59RW7Q7kCYaSZw19DcgBb9WAd3FMoxAueP4o0ywLfk4H2...@mail.gmail.com>
Subject: Re: [Neo4j] Cypher q: function to get start/end nodes of relationships?
From: Peter Neubauer <peter.neuba...@neotechnology.com>
To: "neo4j@googlegroups.com" <neo4j@googlegroups.com>
Content-Type: multipart/alternative; boundary=047d7b33dc6455aa8204cc04ae01
--047d7b33dc6455aa8204cc04ae01
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
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-speci=
fic-relation/12815197#12815197
>
> 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).)
>> Aseem
>>
>> On Sat, Oct 13, 2012 at 12:13 PM, Michael Hunger <
michael.hun...@neotechnology.com> wrote:
>>>
>>> Sure I know :)
>>> Was just demonstrating a "true" case
>>> Am 13.10.2012 um 17:48 schrieb Andres Taylor:
>>>
>>> On Sat, Oct 13, 2012 at 5:43 PM, Michael Hunger <
michael.hun...@neotechnology.com> wrote:
>>>>
>>>> actually you can even use
>>>>
>>>> MATCH p =3D (a) -[r:FOLLOWS]- (b)
>>>> WHERE a =3D 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=E9s
>>> --
>>>
>>>
>>>
>>> --
>>>
>>>
>>
>> --
>>
>>
>
> --
>
>
>
--=20
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
--047d7b33dc6455aa8204cc04ae01
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Agreed Wes, <br>Looks like a very useful addition. <br><br>On Sunday, Octob=
er 14, 2012, Wes Freeman <<a href=3D"mailto:freeman....@gmail.com">freem=
an....@gmail.com</a>> wrote:<br>> Another use case for this is someth=
ing like this, match both directions where one direction or foo:<br>
> <a href=3D"http://stackoverflow.com/questions/12814038/neo4j-cypher-qu=
ery-filter-specific-relation/12815197#12815197">http://stackoverflow.com/qu=
estions/12814038/neo4j-cypher-query-filter-specific-relation/12815197#12815=
197</a><br>
><br>> Wes<br>><br>> On Sat, Oct 13, 2012 at 8:35 PM, Aseem Kis=
hore <<a href=3D"mailto:aseem.kish...@gmail.com">aseem.kish...@gmail.com=
</a>> wrote:<br>>><br>>> Ah, in my case at least, I'm in=
terested in both directions -- hence not specifying a direction in MATCH. I=
'm having trouble imagining a case where you *wouldn't* be interest=
ed in both directions if you wanted to WHERE on the direction.<br>
>> (In my case, my WHERE looks something like (direction in AND foo) =
OR (direction out AND bar).)<br>>> Aseem<br>>><br>>> On S=
at, Oct 13, 2012 at 12:13 PM, Michael Hunger <<a href=3D"mailto:michael.=
hun...@neotechnology.com">michael.hun...@neotechnology.com</a>> wrote:<b=
r>
>>><br>>>> Sure I know :)<br>>>> Was just demons=
trating a "true" case<br>>>> Am 13.10.2012 um 17:48 schr=
ieb Andres Taylor:<br>>>><br>>>> On Sat, Oct 13, 2012 at =
5:43 PM, Michael Hunger <<a href=3D"mailto:michael.hunger@neotechnology.=
com">michael.hun...@neotechnology.com</a>> wrote:<br>
>>>><br>>>>> actually you can even use=A0<br>>&g=
t;>><br>>>>> MATCH p =3D (a) -[r:FOLLOWS]- (b)<br>>>=
;>> WHERE a =3D head(nodes(p))<br>>>><br>>>> Sorry =
amigo, but that doesn't work. The path always follows the pattern you h=
ave described - in this pattern, a will _always_ be a the head of p. =A0<br=
>
>>> Andr=E9s<br>>>> --<br>>>> =A0<br>>>>=
; =A0<br>>>><br>>>> --<br>>>> =A0<br>>>>=
; =A0<br>>><br>>> --<br>>> =A0<br>>> =A0<br>><br=
>> --<br>
> =A0<br>> =A0<br>><br><br>-- <br><br>Cheers,<br><br>/peter neubau=
er<br><br>G: =A0neubauer.peter<br>S: =A0peter.neubauer<br>P: =A0+46 704 106=
975<br>L: =A0 <a href=3D"http://www.linkedin.com/in/neubauer" target=3D"_bl=
ank">http://www.linkedin.com/in/neubauer</a><br>
T: =A0 @peterneubauer<br><br>Neo4j 1.8 GA - <a href=3D"http://www.dzone.com=
/links/neo4j_18_release_fluent_graph_literacy.html" target=3D"_blank">http:=
//www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html</a><br>
--047d7b33dc6455aa8204cc04ae01--