If you're only returning nodes on depth=X (let's say X=4) and want to filter relationships all along the way then maybe I'd use something along the lines of:
"prune evaluator": { "language": "javascript", "body": "position.lastRelationship().getProperty(\"userGroupId\",0) == 111;" } "return filter": { "language": "javascript", "body": "position.length() == 4 && position.lastRelationship().getProperty(\"userGroupId\",0) == 111;" } So that branches only branches that have "userGroupId"==111 will continue to be traversed and only paths of length 4 will be returned where the last relationship has "userGroupId"==111 will be returned. (untested code). 2011/3/21 Max De Marzi Jr. <maxdema...@gmail.com> > Add Something like: > > "return filter": { "language": "javascript", "body": > "position.lastRelationship().hasProperty(\"userGroupId\") > position.lastRelationship().getProperty(\"userGroupId\") == 111;"}}) > > to your traversal. > > On Mon, Mar 21, 2011 at 9:44 AM, Kevin Dieter <kevin.die...@megree.com> > wrote: > > Hi, > > > > I am using the REST API from a .Net application and have a need to find > > paths between nodes and I would like to include or exclude relationships > > based on a property value. > > > > For example: > > > > 1. Node1 has an outgoing relationship of type "Friend", with > relationship > > property userGroupId= 111 to Node2 > > 2. Node2 has an outgoing relationship of type "Family", with > relationship > > property userGroupId= 111 to Node3 > > 3. Node1 has an outgoing relationship of type "WorkedWith", with > > relationship property userGroupId= 222 to Node3 > > > > > > I would like to find paths from Node1 to Node3 using relationships of any > > type, but only using those relationships with userGroupId=111. This > should > > return the path that includes Node2 and the first two relationships, but > > should not include the direct path that uses the third relationship. > > > > Is this possible using the REST API? > > > > Thanks, > > > > Kevin > > _______________________________________________ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user