Nuo, I don't think you can refer to the return filter via a reference. Could you post your graph and the curl command you are doing so I could take a look at it? It should work ... take even a look at http://docs.neo4j.org/chunked/snapshot/rest-api-traverse.html#rest-api-traversal-using-a-return-filter for the right syntax.
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 Tue, Aug 16, 2011 at 4:02 AM, Nuo Yan <[email protected]> wrote: > I wanted to traverse the graph from my origin node, and get all nodes in the > next level only (max depth == 1) such that they have "foo" relationship type > with the origin node but not "bar" relationship type. > > I set my return filter to be: > > { > "language" : "javascript", > "body" : "position.length() > 0 && > position.lastRelationship().getType() != 'bar'" > } > > > And the body of the request is: > { > "order" : "breadth first", > "relationships" : [{"direction" : "all", "type" : "foo"}], > "uniqueness" : "node_global", > "prune_evaluator" : {"language":"builtin", "name" : "none"}, > "max_depth" : 1, > "return_filter" : return_filter (see above) > } > > However, it still gets all nodes with "foo" relationship, even those with > "bar" relationship. Where did I do wrong? What's the right way to exclude > nodes connected with certain relationship type(s) when traversing the > graph? > > Thanks! > Nuo > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

