Skip to content

Feature request for calculating the length of edge path #1494

@matth3wga0

Description

@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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/querylangIssues related to the query language specification and implementation.area/querylang/algosRelated to graph algorithms, such as k-shortest path.kind/featureSomething completely new we should consider.priority/P3Low priority, something to be done once everything else seems fixed.status/acceptedWe accept to investigate/work on it.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions