I am running into curious problem.
In graph above,I can't run repeat/until due to memory overload issue and vertices names changing at various level. I am trying direct edge traversal through each step.
However, I see that the query is only showing paths with max traversal depth.
Graph:
g.addV(‘color-group’).property(id,1).property(single, ‘Color’, ‘primary’).next()
g.addV(‘primary-color’).property(id,2).property(single, ‘Color’, ‘red’).next()
g.addV(‘primary-color’).property(id,3).property(single, ‘Color’, ‘blue’).next()
g.addV(‘primary-color’).property(id,4).property(single, ‘Color’, ‘yellow’).next()
g.addV(‘secondary-color’).property(id,5).property(single, ‘Color’, ‘red-10’).next()
g.V(1).addE('links').to(g.V(2)).next()
g.V(1).addE('links').to(g.V(3)).next()
g.V(1).addE('links').to(g.V(4)).next()
g.V(4).addE('links').to(g.V(5)).next()
Query:
>>> g.V().hasLabel('color-group').has('Color', 'primary').as_('color_group').outE().inV().outE().inV().path().next()
Result:
path[v[1], e[40][1-links->4], v[4], e[41][4-links->5], v[5]]
so above its skipping paths from primary -> blue
and primary -> yellow
and only showing paths from primary -> red -> red-10
.
I need all of the paths (without using repeat/until).
Any ideas?
Thanks.