Github user dkuppitz commented on the pull request:

    
https://github.com/apache/tinkerpop/commit/e790e56aaa2118b07e36f2579502786bd9d79cc0#commitcomment-17830569
  
    In docs/src/recipes/centrality.asciidoc:
    In docs/src/recipes/centrality.asciidoc on line 75:
    Because of the mid-traversal `V()` this query will not work in OLAP. If we 
make it a little bit more complex, we can make it work in OLAP:
    
    ```
    g.withSack(0).V().store("x").repeat(both().simplePath()).emit().path().
      group().by(project("a","b").by(limit(local, 1)).
                                  by(tail(local, 1))).
              by(order().by(count(local))).
              select(values).as("shortestPaths").
              select("x").unfold().as("v").
              select("shortestPaths").
                map(unfold().filter(unfold().where(eq("v"))).count()).
                sack(sum)./*barrier(normSack).*/sack().as("betweeness").
              select("v","betweeness")
    ```
    
    Note that I had to remove the sack normalization as it seems to be buggy 
for this query (when normalized, all betweeness values become the same, 
`0.1666...`)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to