Skip to content

Instantly share code, notes, and snippets.

@spmallette
Created November 15, 2022 13:15
Show Gist options
  • Save spmallette/3fff9f9dcd1026f923e36252749778de to your computer and use it in GitHub Desktop.
Save spmallette/3fff9f9dcd1026f923e36252749778de to your computer and use it in GitHub Desktop.
g.withSack(0).
V().has('airport','code', frm).
repeat(__.outE('route').sack(sum).by('dist').inV().simplePath()).
until(__.has("code",to).or_().loops().is_(maxstops)).
has('code', to).
limit(sample).
order().
by(__.sack()).
local(__.union(__.path().by('code').by('dist'),__.sack()).unfold().fold()).
limit(limit).
toList())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment