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