0
votes

with the REST api traversal , is it possible to put loop structures in the body of the prune_evaluator ? according to this example : http://docs.neo4j.org/chunked/milestone/rest-api-traverse.html#rest-api-traversal-using-a-return-filter

i would like to get a property of all relationships of my path but i dont know how to do with relationships() : http://components.neo4j.org/neo4j/2.1.0-M02/apidocs/org/neo4j/graphdb/Path.html

greeting

1

1 Answers

0
votes

If you mean javascript loops, then yes, you can put arbitrary javascript code in the evaluator. As long as the expression returns a boolean value.

Something like

var counter=0; for(var i=0;i<10;i++) { counter++; }; counter > 5;