arangosh> var examples = require("@arangodb/graph-examples/example-graph.js"); arangosh> var g = examples.loadGraph("routeplanner"); arangosh> g._shortestPath({}, {}, {weight : 'distance', endVertexCollectionRestriction : 'frenchCity', ........> startVertexCollectionRestriction : 'germanCity'}); [ { "vertices" : [ "frenchCity/Lyon", "frenchCity/Paris" ], "edges" : [ { "_key" : "117327", "_id" : "frenchHighway/117327", "_from" : "frenchCity/Paris", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldEO--_", "distance" : 550 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Lyon", "germanCity/Cologne" ], "edges" : [ { "_key" : "117344", "_id" : "internationalHighway/117344", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldES--D", "distance" : 700 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Lyon", "germanCity/Hamburg" ], "edges" : [ { "_key" : "117341", "_id" : "internationalHighway/117341", "_from" : "germanCity/Hamburg", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldES--B", "distance" : 1300 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Lyon", "germanCity/Berlin" ], "edges" : [ { "_key" : "117331", "_id" : "internationalHighway/117331", "_from" : "germanCity/Berlin", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldEO--B", "distance" : 1100 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Paris", "frenchCity/Lyon" ], "edges" : [ { "_key" : "117327", "_id" : "frenchHighway/117327", "_from" : "frenchCity/Paris", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldEO--_", "distance" : 550 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Paris", "germanCity/Cologne" ], "edges" : [ { "_key" : "117347", "_id" : "internationalHighway/117347", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Paris", "_rev" : "_YYCldEW--_", "distance" : 550 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Paris", "germanCity/Hamburg" ], "edges" : [ { "_key" : "117338", "_id" : "internationalHighway/117338", "_from" : "germanCity/Hamburg", "_to" : "frenchCity/Paris", "_rev" : "_YYCldES--_", "distance" : 900 } ], "distance" : 1 }, { "vertices" : [ "frenchCity/Paris", "germanCity/Berlin" ], "edges" : [ { "_key" : "117335", "_id" : "internationalHighway/117335", "_from" : "germanCity/Berlin", "_to" : "frenchCity/Paris", "_rev" : "_YYCldEO--D", "distance" : 1200 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Cologne", "frenchCity/Lyon" ], "edges" : [ { "_key" : "117344", "_id" : "internationalHighway/117344", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldES--D", "distance" : 700 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Cologne", "frenchCity/Paris" ], "edges" : [ { "_key" : "117347", "_id" : "internationalHighway/117347", "_from" : "germanCity/Cologne", "_to" : "frenchCity/Paris", "_rev" : "_YYCldEW--_", "distance" : 550 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Cologne", "germanCity/Hamburg" ], "edges" : [ { "_key" : "117324", "_id" : "germanHighway/117324", "_from" : "germanCity/Hamburg", "_to" : "germanCity/Cologne", "_rev" : "_YYCldEK--D", "distance" : 500 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Cologne", "germanCity/Berlin" ], "edges" : [ { "_key" : "117317", "_id" : "germanHighway/117317", "_from" : "germanCity/Berlin", "_to" : "germanCity/Cologne", "_rev" : "_YYCldEK--_", "distance" : 850 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Hamburg", "frenchCity/Lyon" ], "edges" : [ { "_key" : "117341", "_id" : "internationalHighway/117341", "_from" : "germanCity/Hamburg", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldES--B", "distance" : 1300 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Hamburg", "frenchCity/Paris" ], "edges" : [ { "_key" : "117338", "_id" : "internationalHighway/117338", "_from" : "germanCity/Hamburg", "_to" : "frenchCity/Paris", "_rev" : "_YYCldES--_", "distance" : 900 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Hamburg", "germanCity/Cologne" ], "edges" : [ { "_key" : "117324", "_id" : "germanHighway/117324", "_from" : "germanCity/Hamburg", "_to" : "germanCity/Cologne", "_rev" : "_YYCldEK--D", "distance" : 500 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Hamburg", "germanCity/Berlin" ], "edges" : [ { "_key" : "117321", "_id" : "germanHighway/117321", "_from" : "germanCity/Berlin", "_to" : "germanCity/Hamburg", "_rev" : "_YYCldEK--B", "distance" : 400 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Berlin", "frenchCity/Lyon" ], "edges" : [ { "_key" : "117331", "_id" : "internationalHighway/117331", "_from" : "germanCity/Berlin", "_to" : "frenchCity/Lyon", "_rev" : "_YYCldEO--B", "distance" : 1100 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Berlin", "frenchCity/Paris" ], "edges" : [ { "_key" : "117335", "_id" : "internationalHighway/117335", "_from" : "germanCity/Berlin", "_to" : "frenchCity/Paris", "_rev" : "_YYCldEO--D", "distance" : 1200 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Berlin", "germanCity/Cologne" ], "edges" : [ { "_key" : "117317", "_id" : "germanHighway/117317", "_from" : "germanCity/Berlin", "_to" : "germanCity/Cologne", "_rev" : "_YYCldEK--_", "distance" : 850 } ], "distance" : 1 }, { "vertices" : [ "germanCity/Berlin", "germanCity/Hamburg" ], "edges" : [ { "_key" : "117321", "_id" : "germanHighway/117321", "_from" : "germanCity/Berlin", "_to" : "germanCity/Hamburg", "_rev" : "_YYCldEK--B", "distance" : 400 } ], "distance" : 1 } ]