Alex, the example is now out in the docs, see http://docs.neo4j.org/chunked/snapshot/rest-api-traverse.html#rest-api-traversal-returning-nodes-below-a-certain-depth
Is that helpful for you? 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 - Your high performance graph database. http://startupbootcamp.org/ - Ă–resund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Sun, Sep 4, 2011 at 10:57 AM, Peter Neubauer < [email protected]> wrote: > Alex, > have a local test running this and will push it soon, it looks like > > /** > > * Traversal returning nodes below a certain depth. > > * > > * Here, all nodes at a traversal depth below 3 are returned. > > */ > > //TODO add ot the docs > > @Documented > > @Graph( {"Root knows Mattias", "Root knows Johan", "Johan knows Emil", > "Emil knows Peter", "Emil knows Tobias", "Tobias loves Sara"} ) > > @Test > > public void shouldGetExpectedHitsWhenTraversingAtDepth() > > throws PropertyValueException > > { > > Node start = getNode( "Root" ); > > String description = JsonHelper.createJsonFrom( MapUtil.map( > > "prune_evaluator", > > MapUtil.map( "language", "builtin", "name", "none" ), > > "return_filter", > > MapUtil.map( "language", "javascript", "body", > > "position.length()<3;" ) ) ); > > String entity = gen.get().expectedStatus( 200 ).payload( > description ).post( > > getTraverseUriNodes( start ) ).entity(); > > expectNodes( entity, getNodes( "Root", "Mattias", "Johan", "Emil") ); > > } > > > And works here (traversal depth < 3, returning Root, Mattias, Johan and > Emil). Will let you know when it is in the docs. > > 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 - Your high performance graph database. > http://startupbootcamp.org/ - Ă–resund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > On Sat, Sep 3, 2011 at 3:47 PM, Alex <[email protected]> wrote: > >> alright, that makes sense... in this case, the following parameters should >> work (30 being a relatively large number in my example) >> >> >> "return_filter": { >> "language": "javascript", >> "body": "position.length()<30;" >> }, >> "prune_evaluator": { >> "language": "builtin", >> "name": "none" >> >> but it doesn't >> >> For clarity's ske, here is the whole call: curl -H Accept:application/json >> -H Content-Type:application/json -X POST >> http://localhost:747b/data/node/2/paths -d >> '{"to":"http://localhost:7474/db/data/node/5 >> ","relationships":{"type":"KNOWS"},"algorithm":"shortestPath","return_filter": >> {"language":"javascript","body":"position.length() < 30;"}, >> "prune_evaluator": {"language":"builtin","name":"none"}}' >> >> Wher's the mistake here? >> >> Thanks! >> Alex >> >> >> -- >> View this message in context: >> http://neo4j-community-discussions.438527.n3.nabble.com/REST-at-depth-tp3304387p3306568.html >> Sent from the Neo4j Community Discussions mailing list archive at >> Nabble.com. >> _______________________________________________ >> Neo4j mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user >> > > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

