arangosh> var examples = require("org/arangodb/graph-examples/example-graph.js"); arangosh> var g = examples.loadGraph("routeplanner"); arangosh> g._shortestPath({}, {}, {weight : 'distance', endVertexCollectionRestriction : 'frenchCity', ........> startVertexCollectionRestriction : 'germanCity'}); [ [ { "startVertex" : "germanCity/Berlin", "vertex" : { "_id" : "frenchCity/Lyon", "_key" : "Lyon", "_rev" : "491595939", "isCapital" : false, "population" : 80000 }, "paths" : [ { "edges" : [ { "_id" : "internationalHighway/493168803", "_key" : "493168803", "_rev" : "493168803", "_from" : "germanCity/Berlin", "_to" : "frenchCity/Lyon", "distance" : 1100 } ], "vertices" : [ { "_id" : "germanCity/Berlin", "_key" : "Berlin", "_rev" : "490809507", "isCapital" : true, "population" : 3000000 }, { "_id" : "frenchCity/Lyon", "_key" : "Lyon", "_rev" : "491595939", "isCapital" : false, "population" : 80000 } ] } ], "distance" : 1100 }, { "startVertex" : "germanCity/Berlin", "vertex" : { "_id" : "frenchCity/Paris", "_key" : "Paris", "_rev" : "491792547", "isCapital" : true, "population" : 4000000 }, "paths" : [ { "edges" : [ { "_id" : "internationalHighway/493365411", "_key" : "493365411", "_rev" : "493365411", "_from" : "germanCity/Berlin", "_to" : "frenchCity/Paris", "distance" : 1200 } ], "vertices" : [ { "_id" : "germanCity/Berlin", "_key" : "Berlin", "_rev" : "490809507", "isCapital" : true, "population" : 3000000 }, { "_id" : "frenchCity/Paris", "_key" : "Paris", "_rev" : "491792547", "isCapital" : true, "population" : 4000000 } ] } ], "distance" : 1200 }, { "startVertex" : "germanCity/Cologne", "vertex" : { "_id" : "frenchCity/Paris", "_key" : "Paris", "_rev" : "491792547", "isCapital" : true, "population" : 4000000 }, "paths" : [ { "edges" : [ { "_id" : "internationalHighway/494151843", "_key" : "494151843", "_rev" : "494151843", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Paris", "distance" : 550 } ], "vertices" : [ { "_id" : "germanCity/Cologne", "_key" : "Cologne", "_rev" : "491006115", "isCapital" : false, "population" : 1000000 }, { "_id" : "frenchCity/Paris", "_key" : "Paris", "_rev" : "491792547", "isCapital" : true, "population" : 4000000 } ] } ], "distance" : 550 }, { "startVertex" : "germanCity/Cologne", "vertex" : { "_id" : "frenchCity/Lyon", "_key" : "Lyon", "_rev" : "491595939", "isCapital" : false, "population" : 80000 }, "paths" : [ { "edges" : [ { "_id" : "internationalHighway/493955235", "_key" : "493955235", "_rev" : "493955235", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Lyon", "distance" : 700 } ], "vertices" : [ { "_id" : "germanCity/Cologne", "_key" : "Cologne", "_rev" : "491006115", "isCapital" : false, "population" : 1000000 }, { "_id" : "frenchCity/Lyon", "_key" : "Lyon", "_rev" : "491595939", "isCapital" : false, "population" : 80000 } ] } ], "distance" : 700 }, { "startVertex" : "germanCity/Hamburg", "vertex" : { "_id" : "frenchCity/Paris", "_key" : "Paris", "_rev" : "491792547", "isCapital" : true, "population" : 4000000 }, "paths" : [ { "edges" : [ { "_id" : "internationalHighway/493562019", "_key" : "493562019", "_rev" : "493562019", "_from" : "germanCity/Hamburg", "_to" : "frenchCity/Paris", "distance" : 900 } ], "vertices" : [ { "_id" : "germanCity/Hamburg", "_key" : "Hamburg", "_rev" : "491202723", "isCapital" : false, "population" : 1000000 }, { "_id" : "frenchCity/Paris", "_key" : "Paris", "_rev" : "491792547", "isCapital" : true, "population" : 4000000 } ] } ], "distance" : 900 }, { "startVertex" : "germanCity/Hamburg", "vertex" : { "_id" : "frenchCity/Lyon", "_key" : "Lyon", "_rev" : "491595939", "isCapital" : false, "population" : 80000 }, "paths" : [ { "edges" : [ { "_id" : "germanHighway/492513443", "_key" : "492513443", "_rev" : "492513443", "_from" : "germanCity/Hamburg", "_to" : "germanCity/Cologne", "distance" : 500 }, { "_id" : "internationalHighway/493955235", "_key" : "493955235", "_rev" : "493955235", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Lyon", "distance" : 700 } ], "vertices" : [ { "_id" : "germanCity/Hamburg", "_key" : "Hamburg", "_rev" : "491202723", "isCapital" : false, "population" : 1000000 }, { "_id" : "germanCity/Cologne", "_key" : "Cologne", "_rev" : "491006115", "isCapital" : false, "population" : 1000000 }, { "_id" : "frenchCity/Lyon", "_key" : "Lyon", "_rev" : "491595939", "isCapital" : false, "population" : 80000 } ] } ], "distance" : 1200 } ] ]