mirror of https://gitee.com/bigwinds/arangodb
20 lines
502 B
Plaintext
20 lines
502 B
Plaintext
arangosh> var examples = require("org/arangodb/graph-examples/example-graph.js");
|
|
arangosh> var graph = examples.loadGraph("routeplanner");
|
|
arangosh> graph._countCommonNeighbors('germanCity/Hamburg', {}, {direction : 'outbound', maxDepth : 2},
|
|
........> {direction : 'outbound', maxDepth : 2});
|
|
[
|
|
{
|
|
"germanCity/Hamburg" : [
|
|
{
|
|
"germanCity/Berlin" : 3
|
|
},
|
|
{
|
|
"germanCity/Cologne" : 2
|
|
},
|
|
{
|
|
"frenchCity/Paris" : 1
|
|
}
|
|
]
|
|
}
|
|
]
|