Re: [Neo4j] Cypher 3 Trees

2011-12-08 Thread cporte
you do and would like to do. Doesn't matter if you use Cypher or not. Thanks! Andrés -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Cypher-3-Trees-tp3567444p3569732.html Sent from the Neo4j Community Discussions mailing list archive

Re: [Neo4j] Cypher 3 Trees

2011-12-08 Thread Rickard Öberg
On 12/7/11 21:53 , Andres Taylor wrote: A subset of the graphs are trees, and they have a few problems that are specific for them. I'm right now planning what needs to be added to Cypher to make it play nice with your tree structures. I'd love to know if you have hierarchical data, and what

Re: [Neo4j] Cypher 3 Trees

2011-12-08 Thread Andres Taylor
On Thu, Dec 8, 2011 at 9:56 AM, Rickard Öberg rickard.ob...@neotechnology.com wrote: Here's a problem I had recently: I have an organizational structure defined as a tree. On each level there might be cases assigned for completion. Given a OU I want to find all OU's that has the given OU as

Re: [Neo4j] Cypher 3 Trees

2011-12-08 Thread Rickard Öberg
On 12/8/11 17:19 , Andres Taylor wrote: I'm guessing something like this: start ou=node(1234) match (ou)-[:CHILD_OU*..100]-(child_ou)-[:OWNER]-(case) where case.status = CLOSED return avg(case.completionTime) Question is, will the OU itself be included? Or does this imply that there *has*

Re: [Neo4j] Cypher 3 Trees

2011-12-08 Thread Andres Taylor
On Thu, Dec 8, 2011 at 10:32 AM, Rickard Öberg rickard.ob...@neotechnology.com wrote: Ok, so with: start ou=node(1234) match (ou)-[:CHILD_OU*0..100]-(child_ou)-[:OWNER]-(case) where case.status = CLOSED return avg(case.completionTime) that would give me what I want? I think so.

[Neo4j] Cypher 3 Trees

2011-12-07 Thread Andres Taylor
A subset of the graphs are trees, and they have a few problems that are specific for them. I'm right now planning what needs to be added to Cypher to make it play nice with your tree structures. I'd love to know if you have hierarchical data, and what queries you do and would like to do. Doesn't

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread Peter Neubauer
Mmh, I would like to see that I can specify the stem of the tree as a path and then get leaf nodes out from that, something like START root = node(0) MATCH stem=root-(dir?*), stem-[:LEAF]-leaf WHERE all(x in nodes(stem) WHERE x.importance 30) RETURN leaf, stem Does that make sense? Cheers,

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread Michael Hunger
I would love to see consideration of branch ordering. Predicate support for trees like we now have for paths. And returning trees and subgraphs as cypher results. Can we generalize this discussion to connected subgraphs or is this too early ? Michael Am 07.12.2011 um 16:14 schrieb Peter

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread D. Frej
+1 as this also goes into the direction of nested sets Am 07.12.2011 16:14, schrieb Peter Neubauer: Mmh, I would like to see that I can specify the stem of the tree as a path and then get leaf nodes out from that, something like START root = node(0) MATCH stem=root-(dir?*),

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread Andres Taylor
On Wed, Dec 7, 2011 at 4:47 PM, D. Frej dieter_f...@gmx.net wrote: +1 as this also goes into the direction of nested sets I don't get it. Maybe I have my nomenclature all wrong, but thishttp://en.wikipedia.org/wiki/Nested_set_modelis what I think of when I hear nested sets. What am I missing?

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread Andres Taylor
On Wed, Dec 7, 2011 at 4:14 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Mmh, I would like to see that I can specify the stem of the tree as a path and then get leaf nodes out from that Yeah, the cook book exposed this weakness clearly... , something like START root =

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread Andres Taylor
On Wed, Dec 7, 2011 at 4:25 PM, Michael Hunger michael.hun...@neotechnology.com wrote: I would love to see consideration of branch ordering. What do you mean? An example would be helpful. Predicate support for trees like we now have for paths. Didn't think in these terms. I like it. Do

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread D. Frej
ok, I agree I was too short on this one. What Peter suggested was to start somewhere in a tree (stem) and get the leafs based on a condition (x.importance 30). For me, this is similiar to hierarchies, which are often build with the help nested sets in RDBMS. Anyways: forget about my comment.

Re: [Neo4j] Cypher 3 Trees

2011-12-07 Thread Michael Hunger
E.g. a timeline tree with root - centuries - years - months - days - hours I want to traverse the tree with cypher in the order of the entries, e.g. to extract data in a ordered fashion. Am 07.12.2011 um 17:05 schrieb Andres Taylor: On Wed, Dec 7, 2011 at 4:25 PM, Michael Hunger