Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1489 baeabd7c8 -> b6f2cddaf (forced update)
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-1489 Commit: e962f5964f59f116f58c3294f38ac5c4904732e9 Parents: c8cc0e5 Author: Marko A. Rodriguez <[email protected]> Authored: Fri Jun 30 12:48:35 2017 -0600 Committer: Marko A. Rodriguez <[email protected]> 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 ~~~~~~~~~~~
