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" : [
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
},
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20168",
"_id" : "germanHighway/20168",
"_from" : "germanCity/Hamburg",
"_to" : "germanCity/Cologne",
"_rev" : "20168",
"distance" : 500
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
},
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
}
],
"edges" : [
{
"_key" : "20161",
"_id" : "germanHighway/20161",
"_from" : "germanCity/Berlin",
"_to" : "germanCity/Cologne",
"_rev" : "20161",
"distance" : 850
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
},
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
}
],
"edges" : [
{
"_key" : "20188",
"_id" : "internationalHighway/20188",
"_from" : "germanCity/Cologne",
"_to" : "frenchCity/Lyon",
"_rev" : "20188",
"distance" : 700
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
},
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
}
],
"edges" : [
{
"_key" : "20191",
"_id" : "internationalHighway/20191",
"_from" : "germanCity/Cologne",
"_to" : "frenchCity/Paris",
"_rev" : "20191",
"distance" : 550
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
},
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20168",
"_id" : "germanHighway/20168",
"_from" : "germanCity/Hamburg",
"_to" : "germanCity/Cologne",
"_rev" : "20168",
"distance" : 500
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
},
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
}
],
"edges" : [
{
"_key" : "20165",
"_id" : "germanHighway/20165",
"_from" : "germanCity/Berlin",
"_to" : "germanCity/Hamburg",
"_rev" : "20165",
"distance" : 400
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
},
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
}
],
"edges" : [
{
"_key" : "20185",
"_id" : "internationalHighway/20185",
"_from" : "germanCity/Hamburg",
"_to" : "frenchCity/Lyon",
"_rev" : "20185",
"distance" : 1300
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
},
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
}
],
"edges" : [
{
"_key" : "20182",
"_id" : "internationalHighway/20182",
"_from" : "germanCity/Hamburg",
"_to" : "frenchCity/Paris",
"_rev" : "20182",
"distance" : 900
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
},
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20161",
"_id" : "germanHighway/20161",
"_from" : "germanCity/Berlin",
"_to" : "germanCity/Cologne",
"_rev" : "20161",
"distance" : 850
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
},
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20165",
"_id" : "germanHighway/20165",
"_from" : "germanCity/Berlin",
"_to" : "germanCity/Hamburg",
"_rev" : "20165",
"distance" : 400
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
},
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
}
],
"edges" : [
{
"_key" : "20175",
"_id" : "internationalHighway/20175",
"_from" : "germanCity/Berlin",
"_to" : "frenchCity/Lyon",
"_rev" : "20175",
"distance" : 1100
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
},
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
}
],
"edges" : [
{
"_key" : "20179",
"_id" : "internationalHighway/20179",
"_from" : "germanCity/Berlin",
"_to" : "frenchCity/Paris",
"_rev" : "20179",
"distance" : 1200
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
},
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20188",
"_id" : "internationalHighway/20188",
"_from" : "germanCity/Cologne",
"_to" : "frenchCity/Lyon",
"_rev" : "20188",
"distance" : 700
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
},
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20185",
"_id" : "internationalHighway/20185",
"_from" : "germanCity/Hamburg",
"_to" : "frenchCity/Lyon",
"_rev" : "20185",
"distance" : 1300
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
},
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
}
],
"edges" : [
{
"_key" : "20175",
"_id" : "internationalHighway/20175",
"_from" : "germanCity/Berlin",
"_to" : "frenchCity/Lyon",
"_rev" : "20175",
"distance" : 1100
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
},
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
}
],
"edges" : [
{
"_key" : "20171",
"_id" : "frenchHighway/20171",
"_from" : "frenchCity/Paris",
"_to" : "frenchCity/Lyon",
"_rev" : "20171",
"distance" : 550
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
},
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "20142",
"isCapital" : false,
"loc" : [
50.9364,
6.9528
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20191",
"_id" : "internationalHighway/20191",
"_from" : "germanCity/Cologne",
"_to" : "frenchCity/Paris",
"_rev" : "20191",
"distance" : 550
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
},
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "20145",
"isCapital" : false,
"loc" : [
53.5653,
10.0014
],
"population" : 1000000
}
],
"edges" : [
{
"_key" : "20182",
"_id" : "internationalHighway/20182",
"_from" : "germanCity/Hamburg",
"_to" : "frenchCity/Paris",
"_rev" : "20182",
"distance" : 900
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
},
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "20138",
"isCapital" : true,
"loc" : [
52.5167,
13.3833
],
"population" : 3000000
}
],
"edges" : [
{
"_key" : "20179",
"_id" : "internationalHighway/20179",
"_from" : "germanCity/Berlin",
"_to" : "frenchCity/Paris",
"_rev" : "20179",
"distance" : 1200
}
],
"distance" : 1
},
{
"vertices" : [
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "20152",
"isCapital" : true,
"loc" : [
48.856700000000004,
2.3508
],
"population" : 4000000
},
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "20148",
"isCapital" : false,
"loc" : [
45.76,
4.84
],
"population" : 80000
}
],
"edges" : [
{
"_key" : "20171",
"_id" : "frenchHighway/20171",
"_from" : "frenchCity/Paris",
"_to" : "frenchCity/Lyon",
"_rev" : "20171",
"distance" : 550
}
],
"distance" : 1
}
]