graph
graph copied to clipboard
Add more examples to the longest path search section (5.10.2)
Should add notes showing some alternative approaches that use shorter queries if all you want is to find the path.
gremlin> g.V('3').repeat(out().where(without('a')).store('a')).times(7).path().by('code')
==>[AUS,ATL,YUL,YGL,YPX,AKV,YIK,YZG]
==>[AUS,BOS,CPH,SFJ,JAV,JUV,NAQ,THU]
==>[AUS,YYZ,YTS,YMO,YFA,ZKE,YAT,YPO]
gremlin> g.V('3').repeat(out().dedup()).times(7).path().by('code')
==>[AUS,ATL,YUL,YGL,YPX,AKV,YIK,YZG]
==>[AUS,BOS,CPH,SFJ,JAV,JUV,NAQ,THU]
==>[AUS,YYZ,YTS,YMO,YFA,ZKE,YAT,YPO]