You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2019/08/19 13:14:30 UTC

[tinkerpop] branch master updated: Mentioned ReferenceElementStrategy in the docs to better clarify the types of elements returned CTR

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 229da54  Mentioned ReferenceElementStrategy in the docs to better clarify the types of elements returned CTR
     new 32bf87e  Merge branch 'tp34'
229da54 is described below

commit 229da544da5fe62fac1bfb2055c40c900f5a631a
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Mon Aug 19 09:13:43 2019 -0400

    Mentioned ReferenceElementStrategy in the docs to better clarify the types of elements returned CTR
---
 docs/src/reference/gremlin-applications.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index d54aed2..c9b9bf2 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1809,6 +1809,20 @@ to as "detached elements" and cases where properties are not included are "refer
 With the type of request and detachment model in mind, it is now possible to discuss how best to consider element
 properties in relation to them all in concert.
 
+By default, Gremlin Server sample configurations utilize `ReferenceElementStrategy` when creating the out-of-the-box
+`GraphTraversalSource`. As the name suggests, this means that elements will be detached by reference and will
+therefore not have properties included. The relevant configuration from the Gremlin Server initialization script looks
+like this:
+
+[source,groovy]
+----
+globals << [g : graph.traversal().withStrategies(ReferenceElementStrategy.instance())]
+----
+
+This configuration is global to Gremlin Server and therefore all methods of connection will always return elements
+without properties. If this strategy is not included, then there are other considerations to take into account such as
+the connection type (i.e. script or bytecode) and the serializer.
+
 For script-based requests, users should take care when returning graph elements. By default, elements will be returned
 as "detached elements" and depending on the serializer being used those detached elements may or may not have their
 properties carried with them. Gryo and GraphSON serializers will write all properties in the return payload in this