position.length should return "the length (i.e. the number of relationships)
in the path.". How comes that 'position.length() > 0' returns false for all
callbacks except the start node?

Cheers
Alex



Peter Neubauer wrote:
> 
> The prune evaluator in your second call will return false for all
> callbacks
> except the start node, thus not that useful. Also path algos and traversal
> semantics cannot be mixed, thus I think it will be ignored. See the path
> algo section of docs.neo4j.org for the parameters and examples.
> 
> /peter
> 
> Sent from my phone.
> On Sep 3, 2011 3:29 AM, "Alex" <[email protected]> wrote:
>> I need some basic help. The first call works fine, the second one results
> is
>> no result at all. What am I doing wrong?
>>
>> (1)
>>
>> curl -H Accept:application/json -H Content-Type:application/json -X POST
>> http://localhost:7474/db/data/node/2/paths -d
>> '{"to":"http://localhost:7474/db/data/node/5
> ","relationships":{"type":"KNOWS"},"algorithm":"shortestPath","max_depth":
>> 5}'
>>
>> [ {
>> "start" : "http://localhost:7474/db/data/node/2";,
>> "nodes" : [ "http://localhost:7474/db/data/node/2";,
>> "http://localhost:7474/db/data/node/3";,
>> "http://localhost:7474/db/data/node/4";,
>> "http://localhost:7474/db/data/node/5"; ],
>> "length" : 3,
>> "relationships" : [ "http://localhost:7474/db/data/relationship/0";,
>> "http://localhost:7474/db/data/relationship/1";,
>> "http://localhost:7474/db/data/relationship/2"; ],
>> "end" : "http://localhost:7474/db/data/node/5";
>>
>> So far, so good.
>>
>> (2)
>>
>> curl -H Accept:application/json -H Content-Type:application/json -X POST
>> http://localhost:7474/db/data/node/2/paths -d
>> '{"to":"http://localhost:7474/db/data/node/5
> ","relationships":{"type":"KNOWS"},"algorithm":"shortestPath","prune_evaluator":
>> {"language":"javascript","body":"position.length() > 0;"}}'
>>
>> Nothing is returned.
>>
>> Adding a max_depth makes the call work again, but the prune_evaluator is
>> simply ignored. What am I missing?
>>
>> Thanks!
>> Alex
>>
>>
>> --
>> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/REST-at-depth-tp3304387p3305738.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
> 


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/REST-at-depth-tp3304387p3306456.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

Reply via email to