Hi guys,--I have a graph in which there are some pair of nodes having two edges between them with different labels.Eg : v1 is connected to v2 by an edge e1 labelled "PreReq" and another edge e2 labelled "Together". All the other pair of nodes just have a single edge between them labelled "PreReq".I need to write a query to extract only those vertices that have double edges between them.I tried using the logic of extracting those nodes with an edge labelled "Together"g.E().hasLabel("Together")But the output is this:==>e[2][v1-Together->v2]I need an output of the form: ==>[a:v1, b:v2]Can anyone help me with this?
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/b685d2ac-7c60-4a6c-b327-b741c1d43d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Robert,Thank you for the solution. It's working fine using this logic.In my graph all the doubly connected edges have one edge as "Together" and single edges don't have this label. However I want to try this for a generalized graph where even some single edges might have the label "Together".So in that case my question will be to display the doubly connected nodes as a map.Any insights on how I can do this?
On Saturday, November 19, 2016 at 1:08:39 AM UTC-7, Robert Dale wrote:
Do you want to find those with double edges or just those with "Together" edges? This is for vertices having "Together" edges:As map:g.V().as("a").out("Together").as("b").select("a","b")==>[a:v[0],b:v[1]]Or as list:gremlin> g.V().out("Together").path()==>[v[0],v[1]]
Robert Dale
On Sat, Nov 19, 2016 at 2:23 AM, PRIYANSHA JETLEY <priyans...@gmail.com> wrote:
Hi guys,I have a graph in which there are some pair of nodes having two edges between them with different labels.Eg : v1 is connected to v2 by an edge e1 labelled "PreReq" and another edge e2 labelled "Together". All the other pair of nodes just have a single edge between them labelled "PreReq".I need to write a query to extract only those vertices that have double edges between them.I tried using the logic of extracting those nodes with an edge labelled "Together"g.E().hasLabel("Together")But the output is this:==>e[2][v1-Together->v2]I need an output of the form: ==>[a:v1, b:v2]Can anyone help me with this?
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/b685d2ac-7c60-4a6c-b327-b741c1d43d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/2fc09c8d-2aed-413c-9eed-2da792fbb0ad%40googlegroups.com.