Once I find the time to set up a blog, I'l happily do that.
What's still annoying me is that I do not understand the difference between
the query pairs 7/8 and 9/10 ...
--
View this message in context:
On Thu, Dec 1, 2011 at 4:55 PM, jschweigl johann.schwe...@gmail.com wrote:
Once I find the time to set up a blog, I'l happily do that.
What's still annoying me is that I do not understand the difference between
the query pairs 7/8 and 9/10 ...
I'll have a go.
The difference between 7 and 8
Shouldn't rel2 then be an optional relationship? Otherwise IMHO it can never be
null.
START c=...
MATCH c-[rel1:MyRel]-a, c-[rel2?:MyRel]-b
WHERE rel2 is null
RETURN c
Am 29.11.2011 um 13:00 schrieb D. Frej:
I would recommend the following
START c=...
MATCH c-[rel1:MyRel]-a,
you might be right. I only used it the other way around (rel2 IS NOT
NULL) to guarante that the relationship is there. So I thought ... ;)
However, currently I am quite busy and cannot check easily.
That brings me to a feature request for neoclipse: The possibility to
type and execute a cypher
you are right:
http://docs.neo4j.org/chunked/snapshot/cypher-cookbook.html#_basic_friend_finding_based_on_social_neighborhood
states
START joe=node:node_auto_index(name = Joe)
MATCH joe-[:knows]-friend-[:knows]-friend_of_friend,
joe-[r?:knows]-friend_of_friend
WHERE r IS NULL
Am 29.11.2011
Thanks for all the replies. To explain what I am doing: I'm harvesting
information from the software engineering tool some guys here are using:
Excel (gawk!). Excel sheets are parsed and converted to graphs,
incrementally enriched with properties as I digest subsequent sheets so that
at the end I
Very cool Johann.
Mind writing this into a short blog post? Would love to see this code
and some short illustration on this, even for others to learn from it
...
Cheers,
/peter neubauer
GTalk: neubauer.peter
Skype peter.neubauer
Phone +46 704 106975
LinkedIn
wow, cool
I played once with parsing jaca ast's and putting the in neo4j to answer
similar question (also looking at metrics/dependency graphs)
please write it up!
Michael
mobile mail please excuse brevity and typos
Am 29.11.2011 um 13:59 schrieb jschweigl johann.schwe...@gmail.com:
Thanks
Hi all,
I have three kinds of nodes A, B and C. Both type A and B (distinguished by
a property) have a relationship of the same type to node type C. I want to
find nodes C which have a relationship to A but not to B.
The only idea I came up with is to have a query return all A nodes having a
Johan,
got a graph picture on this?
Cheers,
/peter neubauer
GTalk: neubauer.peter
Skype peter.neubauer
Phone +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer
http://www.neo4j.org - NOSQL for the
If you were doing this in a single traversal, every time you encountered a
node type C, you would have to ask for all it's relationships and dig inside
the end node of those relationships to see if any of them have a property
type for node B.
In two traversals, you'd get an array of all the Cs
while not ideal you could do
START
a=node:node_auto_index(NodeType=A),b=node:node_auto_index(NodeType=B)
MATCH a-[:MyRel]-c-[r?:MyRel]-b
RETURN c, count(r)
and in your code you could filter for count(r) = 0
--
View this message in context:
Good point. I'd believe that thinking of a single node as a degenerated path
wouldn't be that wrong either. However, even returning just the callee
(which is what I wanted anyways) brings no relief, with the relationship
direction having no influence:
08:42:33,150 GraphQuery.java 81 INFO -
Did you try the query I gave you? The problem is not that you are returning
p, it's that you ask Cypher to create a path with nulls in it. Just remove
the p= in the beginning of the MATCH clause, and you should be good to go.
Andrés
On Sat, Nov 5, 2011 at 8:45 AM, jschweigl
Stupid me. Sorry. I should have copypasted your query. Yes, without the path
assignment it works.
Thanks a lot!
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-question-tp3479960p3482176.html
Sent from the Neo4j Community Discussions mailing list
Hi all,
Being a newbie to neo4j/Cypher, didn't come to a solution myself, so I try
it here: how can I query for a set of nodes which have no incoming relation
of a specific type? Something like
START callee=node:node_auto_index('type:*Service') MATCH
p=(caller)-[:CALLS]-(callee)
RETURN p
Hi Johann,
There's a workaround that works, but it's not as nice as I'd like it to be.
What you can do is this:
START callee=node:node_auto_index('type:*Service')
MATCH p=(caller)-[r?:CALLS]-(callee)
WHERE r IS NULL
RETURN p
It solves your problem with optional relationships.
HTH,
Andrés
On
Thanks Andres!
I already tried the optional relationship thing, but not the WHERE clause.
However, there is a problem which I have with or without the WHERE (I'm
using neo4j 1.5M02):
START callee=node:node_auto_index('type:*Service') MATCH
p=(caller)-[r?:CALLS]-(callee) WHERE r IS NULL RETURN p
It's a known (and solved) problem. You can either update to snapshot, or
just reverse your path description:
MATCH p=(callee)-[r?:CALLS]-(caller)
Sorry about that...
Andrés
On Fri, Nov 4, 2011 at 1:42 PM, jschweigl johann.schwe...@gmail.com wrote:
Thanks Andres!
I already tried the
Reversing resulted in the same exception, so I'll try and get the latest
snapshot. Thanks a lot for your help!
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-question-tp3479960p3480016.html
Sent from the Neo4j Community Discussions mailing list
Downloaded 1.5-SNAPSHOT (two times: the windows community and enterprise
flavor). No change, no matter if the relation points back or forth.
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-question-tp3479960p3480184.html
Sent from the Neo4j
On Fri, Nov 4, 2011 at 2:57 PM, jschweigl johann.schwe...@gmail.com wrote:
Downloaded 1.5-SNAPSHOT (two times: the windows community and enterprise
flavor). No change, no matter if the relation points back or forth.
I just realized what the problem is. (It's my fault)
You are putting the
22 matches
Mail list logo