Re: [Neo4j] cypher question - subqueries possible?

2011-12-01 Thread Andres Taylor
On Thu, Dec 1, 2011 at 4:55 PM, jschweigl 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 is which relationship

Re: [Neo4j] cypher question - subqueries possible?

2011-12-01 Thread jschweigl
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: http://neo4j-community-discussions.438527.n3.nabble.com/cypher-question-subqueries-possible-t

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread Michael Hunger
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 : > Thanks for all the replies. To

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread Peter Neubauer
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   http://www.linkedi

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread jschweigl
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 g

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread D. Frej
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

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread D. Frej
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

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread Michael Hunger
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

Re: [Neo4j] cypher question - subqueries possible?

2011-11-29 Thread D. Frej
I would recommend the following START c=... MATCH c-[rel1:MyRel]->a, c-[rel2:MyRel]->b WHERE rel2 is null RETURN c even though it seems it little strange Am 29.11.2011 03:03, schrieb KanTube: > while not ideal you could do > > START > a=node:node_auto_index(NodeType="A"),b=node:node_auto_index

Re: [Neo4j] cypher question - subqueries possible?

2011-11-28 Thread KanTube
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: http://neo4j-community-discussions.438527.n3.n

Re: [Neo4j] cypher question - subqueries possible?

2011-11-28 Thread maxdemarzi
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 t

Re: [Neo4j] cypher question - subqueries possible?

2011-11-28 Thread Peter Neubauer
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 Enterprise.

[Neo4j] cypher question - subqueries possible?

2011-11-28 Thread jschweigl
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 rela