[Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
HI! I am on the situation of having to traverse neo4j, and then expect the resultset returned to be ordered in a certain order. I've been researching a bit over the traversal API, but I did not find anything related to that. I really will appreciate any tip on that!! BTW I expect to be possible

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Hi Pere, To sort you need to have all your results. Thus, in Gremlin (and hopefully you can do the mapping to the core Neo4j traverser framework), results = [] g.v(1).out('friend').out('likes') results // what my friends like results.sort{a,b - a.name = b.name} // sort resultant vertices by

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Niels Hoogeveen
/java/org/neo4j/collections/sortedtree). This allows you to layout the relationships you want to traverse in sorted order. Niels Date: Fri, 15 Jul 2011 16:06:44 +0200 From: p...@moviepilot.com To: user@lists.neo4j.org Subject: [Neo4j] Getting sorted results from a traversal HI! I am

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
Well, this is great if I want to do all the math in memory, but I expect to do the computation by the db. / purbon On 15 July 2011 16:10, Marko Rodriguez okramma...@gmail.com wrote: Hi Pere, To sort you need to have all your results. Thus, in Gremlin (and hopefully you can do the mapping

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Rick Bullotta
discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, this is great if I want to do all the math in memory, but I expect to do the computation by the db. / purbon On 15 July 2011 16:10, Marko Rodriguez okramma...@gmail.com wrote: Hi Pere, To sort you need to have all your

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Hi, Ah. Then I would recommend using a persistent data structure such as the one the Neil discussed in his follow up post. Marko. http://markorodriguez.com On Jul 15, 2011, at 9:04 AM, Pere Urbon Bayes wrote: Well, this is great if I want to do all the math in memory, but I expect to do

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Rick Bullotta
...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:14 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well the graph structure is not relevant here, I think. The property I expect to be sorting is on the destination node, so

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
the relationships you want to traverse in sorted order. Niels Date: Fri, 15 Jul 2011 16:06:44 +0200 From: p...@moviepilot.com To: user@lists.neo4j.org Subject: [Neo4j] Getting sorted results from a traversal HI! I am on the situation of having to traverse neo4j, and then expect

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
] Getting sorted results from a traversal Well the graph structure is not relevant here, I think. The property I expect to be sorting is on the destination node, so I can do the traversal and then expect to run the sorting. Please, tell me how the data structure can help me to deal with that order

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:05 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, this is great if I want to do all the math

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Rick Bullotta
. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:17 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well in fact, I expect to order the resulting set

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Michael Hunger
discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal with that, as the relational system do. / purbon On 15 July 2011 17:08, Rick Bullotta rick.bullo...@thingworx.com wrote: The DB would do it in memory too, wouldn't

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal with that, as the relational system do. / purbon On 15 July 2011 17:08, Rick Bullotta rick.bullo...@thingworx.com wrote: The DB would

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal with that, as the relational system do. / purbon On 15 July 2011 17:08, Rick Bullotta rick.bullo...@thingworx.com wrote: The DB would do it in memory too, wouldn't

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal with that, as the relational system do. / purbon On 15 July 2011

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
[mailto:user-boun...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal with that, as the relational system do. / purbon

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread David Montag
...@lists.neo4j.org [mailto: user-boun...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Hey, Isn't that pretty similar to what https://github.com/peterneubauer/graph-collectionshttps://github.com/peterneubauer/graph-collections/tree/master/src/main/java/org/neo4j/collections/sortedtree provides for Neo4j? I dunno. I haven't played with Graph Collections. But I assume so if it

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Michael Hunger
handle it. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
Jajajaja, Marko I just need to meet you sometime! I always listen good thing about you from Peter and Achim ... I am quite not satisfied, probably I will change somethings on my project in order to fit better with that use case! - purbon On 15 July 2011 20:53, Marko Rodriguez

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Pere Urbon Bayes
...@lists.neo4j.org [mailto: user-boun...@lists.neo4j.org] On Behalf Of Pere Urbon Bayes Sent: Friday, July 15, 2011 11:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, the thing is that the database can easy deal