tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [03/50] [abbrv] tinkerpop git commit: added a tree() example to the docs to clear up any confusion about what happens when duplicate nodes are realized in a tree projection.
Date Mon, 10 Jul 2017 18:18:32 GMT
added a tree() example to the docs to clear up any confusion about what happens when duplicate
nodes are realized in a tree projection.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e962f596
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e962f596
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e962f596

Branch: refs/heads/TINKERPOP-1698
Commit: e962f5964f59f116f58c3294f38ac5c4904732e9
Parents: c8cc0e5
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Fri Jun 30 12:48:35 2017 -0600
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Fri Jun 30 12:48:35 2017 -0600

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e962f596/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index f39fe11..4c95f72 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2283,6 +2283,20 @@ tree['marko']['josh']
 tree.getObjectsAtDepth(3)
 ----
 
+Note that when using `by()`-modulation, tree nodes are combined based on projection uniqueness,
not on the
+uniqueness of the original objects being projected. For instance:
+
+[gremlin-groovy,modern]
+----
+g.V().has('name','josh').out('created').values('name').tree() <1>
+g.V().has('name','josh').out('created').values('name').
+  tree().by('name').by(label).by() <2>
+----
+
+<1> When the `tree()` is created, vertex 3 and 5 are unique and thus, form unique branches
in the tree structure.
+<2> When the `tree()` is `by()`-modulated by `label`, then vertex 3 and 5 are both
"software" and thus are merged to a single node in the tree.
+
+
 [[unfold-step]]
 Unfold Step
 ~~~~~~~~~~~


Mime
View raw message