1
0
Fork 0

Updated documentation and changes for graph features

This commit is contained in:
Michael Hackstein 2015-06-18 09:47:54 +02:00
parent a79730a4ff
commit 0858dce805
2 changed files with 15 additions and 5 deletions

View File

@ -61,11 +61,19 @@ boolean value:
In 2.6 the graph functions did undergo a performance lifting.
During this process we had to adopt the result format and the options for some of them.
In general all graph functions now have an option `includeData` which allows to trigger
Many graph functions now have an option `includeData` which allows to trigger
if the result of this function should contain fully extracted documents `includeData: true`
or only the `_id` values `includeData: false`.
In most use cases the `_id` is sufficient to continue and the extraction of data is an unnecessary
operation.
The AQL functions supporting this additional option are:
* SHORTEST_PATH
* NEIGHBORS
* GRAPH_SHORTEST_PATH
* GRAPH_NEIGHBORS
* GRAPH_EDGES
Furthermore the result `SHORTEST_PATH` has changed. The old format returned a list of all vertices on the path.
Optionally it could include each sub-path for these vertices.
All of the documents were fully extracted.
@ -175,6 +183,9 @@ Example:
]
```
!SUBSECTION Graph measurements functions
!SECTION Function and API changes
!SUBSECTION Graph measurements functions

View File

@ -6472,8 +6472,6 @@ function AQL_TRAVERSAL_TREE (vertexCollection,
/// This function is a wrapper of [GRAPH\_SHORTEST\_PATH](#graph_shortest_path).
/// It does not return the actual path but only the distance between two vertices.
///
/// NOTE: Since version 2.6 we have included a new optional parameter *includeData*.
/// See documentation for [GRAPH\_SHORTEST\_PATH](#graph_shortest_path).
/// @EXAMPLES
///
/// A route planner example, distance from all french to all german cities:
@ -6498,7 +6496,7 @@ function AQL_TRAVERSAL_TREE (vertexCollection,
/// | db._query("FOR e IN GRAPH_DISTANCE_TO("
/// | + "'routeplanner', [{_id: 'germanCity/Cologne'},{_id: 'germanCity/Hamburg'}], " +
/// | "'frenchCity/Lyon', " +
/// | "{weight : 'distance', includeData: true}) RETURN [e.startVertex, e.vertex, e.distance]"
/// | "{weight : 'distance'}) RETURN [e.startVertex, e.vertex, e.distance]"
/// ).toArray();
/// ~ examples.dropGraph("routeplanner");
/// @END_EXAMPLE_ARANGOSH_OUTPUT
@ -8379,7 +8377,8 @@ function AQL_GRAPH_DIAMETER (graphName, options) {
options.algorithm = "Floyd-Warshall";
}
var result = AQL_GRAPH_ABSOLUTE_ECCENTRICITY(graphName, {}, options), max = 0;
var result = AQL_GRAPH_ABSOLUTE_ECCENTRICITY(graphName, {}, options),
max = 0;
Object.keys(result).forEach(function (r) {
if (result[r] > max) {
max = result[r];