Feature request for calculating the length of edge path

Moved from GitHub dgraph/1494

Posted by matth3wga0:

With Neo4j, the query can be ordered by the length of the edge path, and return depth of the path in the query result, it’s useful in some scenario, such as calculating the relationship rank.

In Dgraph, the depth is only a parameter in the recurse query, I think Dgraph can go further.

START n=node:index(Name=“Steven Spielberg”) 
MATCH path=n-->m--l<--o 
RETURN o
ORDER BY length(path);

manishrjain commented :

We also seem to need this for LDBC benchmarks. So, might be worth investigating how much effort this would be.

campoy commented :

Setting low priority since no other requests have been received regarding this issue.