Re: [Neo4j] How to trim first couple nodes from path in traversal framework?

2011-04-07 Thread Mattias Persson
You'd have to do the filtering/pruning in an evaluator, but the sub-pathing afterwards, like: for ( Path path : description.traverse(...) ) { path = subPath( path, 2 ); } private Path subPath( Path source, int from ) { if ( source.length() < from ) thro

Re: [Neo4j] How to trim first couple nodes from path in traversal framework?

2011-04-06 Thread Ville Mattila
Hi Brendan, At least over REST API you could do something like this (untested code): "return filter" : { "language" : "javascript", "body" : "position.length() > 0 && position.lastRelationship().hasProperty('timestamp') && position.lastRelationship().getProperty('timestamp') > '1530'" }

[Neo4j] How to trim first couple nodes from path in traversal framework?

2011-04-06 Thread Brendan Cheng
Hi, I would like to fetch a ending portion of a path where the timestamp of the relationship match. for example: (Node 1)---<2pm>>(Node 3)---<3PM>--->(Node 4)<4PM>--->(Node 64) from the above , I only want the subpath starting from Node 4 onward for the timestamp greater than 3:30PM H