Github user spmallette commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/897#discussion_r206112146
  
    --- Diff: docs/src/recipes/connected-components.asciidoc ---
    @@ -35,46 +54,92 @@ g.addV().property(id, "A").as("a").
       addE("link").from("d").to("e").iterate()
     ----
     
    -One way to detect the various subgraphs would be to do something like this:
    +==== Small graph traversals
     
    +Connected components in a small graph can be determined with either an 
OLTP traversal or the OLAP
    +`connectedComponent()`-step. The `connectedComponent()`-step is available 
as of TinkerPop 3.4.0 and is
    +described in more detail in the
    
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connectedcomponent-step[Reference
 Documentation].
    +The traversal looks like:
     [gremlin-groovy,existing]
     ----
    
-g.V().emit(cyclicPath().or().not(both())).repeat(both()).until(cyclicPath()).  
<1>
    -  path().aggregate("p").                                                   
    <2>
    -  unfold().dedup().                                                        
    <3>
    -  map(__.as("v").select("p").unfold().                                     
    <4>
    -         filter(unfold().where(eq("v"))).
    -         unfold().dedup().order().by(id).fold()).
    -  dedup()                                                                  
    <5>
    +g.withComputer().V().connectedComponent().
    +    group().by('gremlin.connectedComponentVertexProgram.component').
    --- End diff --
    
    This comment combined with the one from @FlorianHockmann is troublesome 
because GLVs don't have `ConnectedComponentVertexProgram` so the Gremlin won't 
work.  I think that's why I wrote the docs this way. Maybe I need to move 
`COMPONENT` to `ConnectedComponent` and then allow GLVs to have access. I'll do 
it that way. 
    
    @dkuppitz do you have a similar issue with this?
    
    
https://github.com/apache/tinkerpop/pull/882/files#diff-36e52ac0c49a08a7f3e6ee54b60a3745R73


---

Reply via email to