Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand section on finding parallel edges #192

Open
krlawrence opened this issue Jul 8, 2020 · 0 comments
Open

Expand section on finding parallel edges #192

krlawrence opened this issue Jul 8, 2020 · 0 comments

Comments

@krlawrence
Copy link
Owner

krlawrence commented Jul 8, 2020

The examples that are used to explore parallel edge detection return results in terms of vertex pairs. It would be good to add examples that return the actual edges instead. A simple example would be to add a duplicate edge between SAF (44) and DFW (8) and then run the query below.

gremlin> g.addE('route').from(V(44)).to(V(8))
==>e[60867][44-route->8]
gremlin> g.V(44).outE().group().by().by(inV().path().by().by(label)).unfold().group().by(values).by(select(keys).fo
ld()).unfold()
==>path[v[44], route, v[13]]=[e[5020][44-route->13]]
==>path[v[44], route, v[8]]=[e[60867][44-route->8], e[5019][44-route->8]]
==>path[v[44], route, v[20]]=[e[5021][44-route->20]]
==>path[v[44], route, v[31]]=[e[5022][44-route->31]]   
gremlin> g.V(44).outE().group().by().by(inV().path().by().by(label)).unfold().group().by(values).by(select(keys).fo
ld()).unfold().filter(select(values).count(local).is(gt(1)))
==>path[v[44], route, v[8]]=[e[60867][44-route->8], e[5019][44-route->8]]       
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant