I am basically trying to search all the connected Vertices for a node type, the Cypher query version gives me the expected result, but the Gremlin version is not giving me the intended result. Any thing that I am doing incorrectly??
Visual Representation of my data
Cyher Query to fetch all the connections
MATCH p=shortestPath((n:Process)-[*]-(m:Process))
WHERE n <> m
RETURN ID(n), n, ID(m), m, length(p)
Gremlin version
gremlin> g.V().hasLabel('Process')
.repeat(both().simplePath())
.until(hasLabel('Process'))
.path().by('title')
==>[Cash Processing,Accounting]
==>[Cash Processing,Sales]
==>[Sales,Marketing]
==>[Sales,Cash Processing]
==>[Marketing,Accounting]
==>[Marketing,Sales]
==>[Accounting,Cash Processing]
==>[Accounting,Marketing]
Any idea why Gremlin is not catching the 'Cash Processing'->'Sales'->'Marketing' connection???
I got a feeling something needs a change in that until() function, but cant figure out what