【问题标题】:Group by out vertices in Gremlin在 Gremlin 中按顶点分组
【发布时间】:2018-03-17 00:56:25
【问题描述】:

我有这个结构:

组 -> 字段 -> 值

还有一个命令g.V().hasLabel('groups').out('fields').out('values')

如何按字段和“组”顶点对这些值进行分组?

谢谢

【问题讨论】:

    标签: gremlin janusgraph


    【解决方案1】:

    这是answered on the Gremlin Users list by Daniel Kuppitz

    g.V().hasLabel("groups").
      group().
        by().
        by(out("fields").
             group().
               by().
               by(out("values").fold()))
    

    【讨论】:

      猜你喜欢
      • 2021-09-14
      • 1970-01-01
      • 2022-01-06
      • 1970-01-01
      • 2017-12-19
      • 2016-10-26
      • 2019-12-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多