8000 Feature Hybrid SmartGraphs by hkernbach · Pull Request #742 · arangodb/docs · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Feature Hybrid SmartGraphs #742

Merged
8000 merged 25 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
73efc64
added general docu about hybrid smart graphs
hkernbach Aug 3, 2021
5b3ffd8
added options to _extendEdgeDefinitions
hkernbach Aug 3, 2021
b90e97f
added options to _editEdgeDefinitions
hkernbach Aug 3, 2021
f59db21
added release notes api changes 39
hkernbach Aug 4, 2021
41b293a
docu for new vertex, new/modify edge
hkernbach Aug 4, 2021
8e052b7
readded already existing doumentation
hkernbach Aug 4, 2021
fee86c2
restructure
hkernbach Aug 4, 2021
6066b49
add vertex collection api
hkernbach Aug 4, 2021
61f7878
Merge branch 'main' of github.com:arangodb/docs into feature/hybrid-s…
hkernbach Aug 4, 2021
0ff4c4f
adding examples
hkernbach Aug 4, 2021
0cd6969
cleanup duplicate
hkernbach Aug 4, 2021
1edf615
Update 3.9/graphs-smart-graphs.md
hkernbach Aug 9, 2021
eacb5d2
added documentation for Hybrid (Disjoint) SmartGraphs to release node…
hkernbach Aug 10, 2021
678001f
Merge branch 'feature/hybrid-smart-graphs' of github.com:arangodb/doc…
hkernbach Aug 10, 2021
ebc0740
added description for edge definition object properties
hkernbach Aug 10, 2021
4d5e061
added note about use case of hybrid smart graph
hkernbach Aug 10, 2021
e6b33ff
Revert "adding examples"
Simran-B Sep 28, 2021
c9bf712
Partial review, some links broken on purpose
Simran-B Sep 28, 2021
9d99229
Fixed Links
santanu82021 Sep 28, 2021
fbc7e30
Merge branch 'main' of https://github.com/arangodb/docs into feature/…
santanu82021 Sep 28, 2021
29f0c0d
Merge remote-tracking branch 'origin/main' into feature/hybrid-smart-…
mchacki Oct 7, 2021
c3c102c
Removed illegally added Merge Conflict marker
mchacki Oct 7, 2021
114b7cb
Review, add JS API examples
Simran-B Oct 11, 2021
cc1c7f3
Fix examples, add generated f 8000 iles for preview
Simran-B Oct 11, 2021
44e9c7d
Add satellites option to SmartGraph management
Simran-B Oct 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix examples, add generated files for preview
  • Loading branch information
Simran-B committed Oct 11, 2021
commit cc1c7f372353d662b1de6ad39d1b00a2d56908b5
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
arangosh&gt; <span class="hljs-keyword">var</span> graph_module = <span class="hljs-built_in">require</span>(<span class="hljs-string">&quot;@arangodb/smart-graph&quot;</span>);
arangosh&gt; <span class="hljs-keyword">var</span> rel = graph_module._relation(<span class="hljs-string">&quot;isCustomer&quot;</span>, <span class="hljs-string">&quot;shop&quot;</span>, <span class="hljs-string">&quot;customer&quot;</span>)
arangosh&gt; <span class="hljs-keyword">var</span> graph = graph_module._create(<span class="hljs-string">&quot;myGraph&quot;</span>, [rel], [], {<span class="hljs-attr">satellites</span>: [<span class="hljs-string">&quot;shop&quot;</span>, <span class="hljs-string">&quot;customer&quot;</span>], <span class="hljs-attr">smartGraphAttribute</span>: <span class="hljs-string">&quot;region&quot;</span>, <span class="hljs-attr">numberOfShards</span>: <span class="hljs-number">9</span>});
arangosh&gt; graph_module._graph(<span class="hljs-string">&quot;myGraph&quot;< 8000 ;/span>);
{[SmartGraph]
<span class="hljs-string">&quot;isCustomer&quot;</span> : [ArangoCollection <span class="hljs-number">10060</span>, <span class="hljs-string">&quot;isCustomer&quot;</span> (type edge, status loaded)],
<span class="hljs-string">&quot;shop&quot;</span> : [ArangoCollection <span class="hljs-number">10058</span>, <span class="hljs-string">&quot;shop&quot;</span> (type <span class="hljs-built_in">document</span>, status loaded)],
<span class="hljs-string">&quot;customer&quot;</span> : [ArangoCollection <span class="hljs-number">10059</span>, <span class="hljs-string">&quot;customer&quot;</span> (type <span class="hljs-built_in">document</span>, status loaded)]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
arangosh&gt; <span class="hljs-keyword">var</span> graph_module = <span class="hljs-built_in">require</span>(<span class="hljs-string">&quot;@arangodb/smart-graph&quot;</span>);
arangosh&gt; <span class="hljs-keyword">var</span> rel = graph_module._relation(<span class="hljs-string">&quot;isCustomer&quot;</span>, <span class="hljs-string">&quot;shop&quot;</span>, <span class="hljs-string">&quot;customer&quot;</span>)
arangosh&gt; <span class="hljs-keyword">var</span> graph = graph_module._create(<span class="hljs-string">&quot;myGraph&quot;</span>, [rel], [], {<span class="hljs-attr">satellites</span>: [<span class="hljs-string">&quot;shop&quot;</span>], <span class="hljs-attr">smartGraphAttribute</span>: <span class="hljs-string">&quot;region&quot;</span>, <span class="hljs-attr">isDisjoint</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">numberOfShards</span>: <span class="hljs-number">9</span>});
arangosh&gt; graph_module._graph(<span class="hljs-string">&quot;myGraph&quot;</span>);
{[SmartGraph]
<span class="hljs-string">&quot;isCustomer&quot;</span> : [ArangoCollection <span class="hljs-number">10079</span>, <span class="hljs-string">&quot;isCustomer&quot;</span> (type edge, status loaded)],
<span class="hljs-string">&quot;shop&quot;</span> : [ArangoCollection <span class="hljs-number">10078</span>, <span class="hljs-string">&quot;shop&quot;</span> (type <span class="hljs-built_in">document</span>, status loaded)],
<span class="hljs-string">&quot;customer&quot;</span> : [ArangoCollection <span class="hljs-number">10068</span>, <span class="hljs-string">&quot;customer&quot;</span> (type <span class="hljs-built_in">document</span>, status loaded)]
}
9 changes: 5 additions & 4 deletions 3.9/graphs-smart-graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ correct sharding already).

In addition to the attributes you would set to create a SmartGraph, there is an
additional attribute `satellites` you need to set. It needs to be an array of
one or more collection names. These names can be used in the edge definition
(relation) and these collections will be created as SatelliteCollections:
one or more collection names. These names can be used in edge definitions
(relations) and these collections will be created as SatelliteCollections.
In this example, both vertex collections are created as SatelliteCollections:

{% arangoshexample examplevar="examplevar" script="script" result="result" %}
@startDocuBlockInline hybridSmartGraphCreateGraphHowTo1_cluster
Expand All @@ -214,7 +215,7 @@ one or more collection names. These names can be used in the edge definition
var rel = graph_module._relation("isCustomer", "shop", "customer")
var graph = graph_module._create("myGraph", [rel], [], {satellites: ["shop", "customer"], smartGraphAttribute: "region", numberOfShards: 9});
graph_module._graph("myGraph");
~graph_module._drop("myGraph");
~graph_module._drop("myGraph", true);
@END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock hybridSmartGraphCreateGraphHowTo1_cluster
{% endarangoshexample %}
Expand All @@ -233,7 +234,7 @@ as a SatelliteCollection in this example:
var rel = graph_module._relation("isCustomer", "shop", "customer")
var graph = graph_module._create("myGraph", [rel], [], {satellites: ["shop"], smartGraphAttribute: "region", isDisjoint: true, numberOfShards: 9});
graph_module._graph("myGraph");
~graph_module._drop("myGraph");
~graph_module._drop("myGraph", true);
@END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock hybridSmartGraphCreateGraphHowTo2_cluster
{% endarangoshexample %}
Expand Down
0