TINKERPOP-1850 Document the use of -1 in range() step CTR

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

Branch: refs/heads/TINKERPOP-1447
Commit: fbcb044d34ad10e8ec88e0380c6cf0a57f002b09
Parents: d56862b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jan 5 15:08:59 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jan 5 15:08:59 2018 -0500

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc                      | 6 ++++--
 .../gremlin/process/traversal/dsl/graph/GraphTraversal.java    | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fbcb044d/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc 
b/docs/src/reference/the-traversal.asciidoc
index 6bf3059..741cda2 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -1684,13 +1684,15 @@ g.E().propertyMap()
 
 As traversers propagate through the traversal, it is possible to only allow a 
certain number of them to pass through
 with `range()`-step (*filter*). When the low-end of the range is not met, 
objects are continued to be iterated. When
-within the low (inclusive) and high (exclusive) range, traversers are emitted. 
Finally, when above the high range, the
-traversal breaks out of iteration.
+within the low (inclusive) and high (exclusive) range, traversers are emitted. 
When above the high range, the traversal
+breaks out of iteration. Finally, the use of `-1` on the high range will emit 
remaining traversers after the low range
+begins.
 
 [gremlin-groovy,modern]
 ----
 g.V().range(0,3)
 g.V().range(1,3)
+g.V().range(1, -1)
 g.V().repeat(both()).times(1000000).emit().range(6,10)
 ----
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fbcb044d/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 29412b8..222fdab 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -1647,7 +1647,7 @@ public interface GraphTraversal<S, E> extends 
Traversal<S, E> {
      * of {@code low} do not pass through and those that exceed the value of 
{@code high} will end the iteration.
      *
      * @param low  the number at which to start allowing objects through the 
stream
-     * @param high the number at which to end the stream
+     * @param high the number at which to end the stream - use {@code -1} to 
emit all remaining objects
      * @return the traversal with an appended {@link RangeGlobalStep}
      * @see <a 
href="http://tinkerpop.apache.org/docs/${project.version}/reference/#range-step";
 target="_blank">Reference Documentation - Range Step</a>
      * @since 3.0.0-incubating
@@ -1664,7 +1664,7 @@ public interface GraphTraversal<S, E> extends 
Traversal<S, E> {
      *
      * @param scope the scope of how to apply the {@code range}
      * @param low   the number at which to start allowing objects through the 
stream
-     * @param high  the number at which to end the stream
+     * @param high  the number at which to end the stream - use {@code -1} to 
emit all remaining objects
      * @return the traversal with an appended {@link RangeGlobalStep} or 
{@link RangeLocalStep} depending on {@code scope}
      * @see <a 
href="http://tinkerpop.apache.org/docs/${project.version}/reference/#range-step";
 target="_blank">Reference Documentation - Range Step</a>
      * @since 3.0.0-incubating

Reply via email to