Perhaps leave off the "relationship" restriction. Then you should be able to 
get what you want.


Am 10.02.2011 um 12:43 schrieb Mattias Persson:

> You could use a custom filter (not tested, just written here in the reply):
> 
> {
>    "order" : "depth first",
>    "uniqueness" : "node",
>    "relationships" : [{"type" : "abc", "direction" : "out" }],
>    "return filter" :
>    {
>        "language" : "javascript",
>        "body" : "position.length() > 0 &&
> position.lastRelationship().getProperty('number',0) == 1"
>    },
>    "max depth" : 1
> }
> 
> 
> 2011/2/10 mike_t <[email protected]>
> 
>> 
>> Hi,
>> 
>> i`m using neo4j with the rest api. I have following question about
>> traversing the graph:
>> 
>> Is it possible to get all relationships of a node by a special property?
>> 
>> Example:
>> 
>> Node A has a relationship ("type=abc", property "number=1") to Node B
>> Node A has a relationship ("type=def", property "number=1") to Node C
>> Node A has a relationship ("type=xyz", property "number=1") to Node D
>> 
>> Now, i wanna have all relationships for Node A with relationship property
>> "number=1". The relationship type don“t cares.
>> 
>> When I traverse the graph i have to define the relationship type like:
>> curl -X POST -H Accept:application/json -H Content-Type:application/json -d
>> '{  "order" : "depth first",  "uniqueness" : "node", "relationships" : [{
>> "type" : "abc", "direction" : "out" }], "return filter" : { "language" :
>> "builtin", "name" : "all" }, "max depth" : 1 }'
>> http://localhost:7474/db/data/node/1/traverse/node
>> 
>> Is the only solution to make an index?
>> 
>> Thanks for your answers!
>> --
>> View this message in context:
>> http://neo4j-user-list.438527.n3.nabble.com/Traversing-by-Relationship-property-tp2464461p2464461.html
>> Sent from the Neo4J User List mailing list archive at Nabble.com.
>> _______________________________________________
>> Neo4j mailing list
>> [email protected]
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> 
> 
> 
> -- 
> Mattias Persson, [[email protected]]
> Hacker, Neo Technology
> www.neotechnology.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

Reply via email to