How to filter out step 3 vertex list based on step 1 vertex


Ronnie
 

Hi,
Assuming following schema
VertexA--edgeAB-->VertexB
VertexA--edgeAC-->VertexC
VertexC--edgeCB-->VertexB

Traversal
step 1: start with VertexB,
step 2: traverse edgeAB to find connected VertexA,
step 3: traverse edgeAC to find connected VertexC
step 4: how to filter out VertexC which are not connect to VertexB from step 1 ?

Gremlin queries that i tried:
g.V().hasLabel("VertexB").as("B").in("edgeAB").out("edgeAC").where(__.out("edgeCB").is("cert"))
g.V().hasLabel("VertexB").as("B").in("edgeAB").out("edgeAC").where(__.out("edgeCB").hasId(__.select("cert").id()))

Expected result: list of VertexC vertices which are connect back to the same VertexB vertex from step 1
Actual result: empty

Any pointers to why these gremlin queries don't work as expected?

Thanks,
Ronnie

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.