As this would be a graph global operation it is not supported as of now, it would be even more expensive to do w/o an index.
Without an index you'd have to:
for (Node n : GlobalGraphOperations.at(gdb).getAllNodes()) {
Relationship rel = n.getRelationships(TYPE,Direction.OUTGOING);
// do something with the relationship
}
or with cypher:
start n=node(*) match n-[r:TYPE]->() return r
see here for an example: http://tinyurl.com/7ewusrs
Michael
Am 30.04.2012 um 16:28 schrieb vlg:
> Hi there,
> Using Neo4j 1.6.2, what would be the best way to iterate over /
> retrieve all the relationships of a specific type ?
> I guess I could use an index on a property that would store the name
> of the relationship type, but this means extra-storage and extra-
> operations upon adding edges, so I was wondering if there were any
> built-in method to achieve this.
> Thanks,
> Vincent