Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-18 Thread Jim Webber
Hi Peter, > Jim: I don't suppose you know if/when the REST API will support these > complex traversals (or END_OF_GRAPH queries)? This unfortunately makes Neo4j > a no-go for our project until then. The REST API does support some complex traversals, but it's not totally equivalent to the either

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-18 Thread Peter Neubauer
Peter, there is no concept of END_OF_GRAPH in Neo4j or Gremlin. It is merely the concept of not including a depth-related component into the stop condition of a traversal. So, your query could maybe be something like g.v(%d).out('JOURNEY').loop(1){it.object.getProperty('stop_id') != '%d'}.out('HOP

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-18 Thread picklepete
Hey Peter, Thanks for the quick reply. I actually started work on my migration using Gremlin, my original query looks like this: g.v(%d).outE{it.label=='JOURNEY'}.inV.loop(3){it.loops < 5 & it.object.getProperty('stop_id') != '%d'}.outE{it.label=='HOP'}.inV.paths I would be querying on one of th

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-18 Thread Peter Neubauer
Hi Peter, using Gremlin or Cypher, you can do more complicated traversals even with the Neo4j Server, see http://docs.neo4j.org/chunked/snapshot/cypher-plugin.html and http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html . While Cypher support for variable length pathes is coming, in Gremlin,

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-18 Thread picklepete
Hey Paddy, Thanks for the inspiration, I had a scour through the source and website, the speed in which you can traverse the graph is incredible! Jim: I don't suppose you know if/when the REST API will support these complex traversals (or END_OF_GRAPH queries)? This unfortunately makes Neo4j a no

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-17 Thread Patrick Fitzgerald
Hi Peter, You might find my journey planner project on github helpful, it uses Neo4j & Google Maps: http://www.github.com/whichway/transportdublin It's coded in Java but hopefully you could get some ideas from it. Cheers Paddy On Wed, Aug 17, 201

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-17 Thread picklepete
Hey Jim, I am unfortunately unable to code in Java (Python/PHP dev), would the best alternative be to use the 'old' traversal core via the REST API to reach the END_OF_GRAPH, and perhaps cherry-pick my results afterwards (instead of your prune/exclude evaluators)? In most of my queries I am goin

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-17 Thread Jim Webber
Hi Peter, It's a bit confusing, but we have (at least) two traverser frameworks, both of which have been around since 1.x. The core traverser API: in the org.neo4j.graphdb package The "new" traverser API: in the org.neo4j.graphdb.traversal package Have a look at the slideware in the neo4j tutor

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-17 Thread picklepete
Hey Jim, No problem on the forum link, it had me confused for a bit ;) Thanks for the example, when you refer to the new Neo4j traverser, is this in 1.4.1? I'm currently running 1.4 and some documentation code examples http://docs.neo4j.org/chunked/1.4/tutorials-java-embedded-traversal.html stil

Re: [Neo4j] Depth and traversals in journey planner migration.

2011-08-17 Thread Jim Webber
Hi Peter, [I'm sure the Greliministas will provide an answer too, but here's the native Neo4j APIs' take] In the Neo4j simple traverser framework, you can set max depth to end of graph. But you constrain the types of relationships you allow the traverser to traverse. That way your traversals t

[Neo4j] Depth and traversals in journey planner migration.

2011-08-17 Thread picklepete
Hello, I am currently researching a migration from MySQL to Neo4j for a journey planner my agency has built for a local bus operator. Due to scaling and performance issues we are looking to migrate to a NoSQL (preferably graph-based) solution. Two of my tests so far, in Gremlin and using traversa