【问题标题】:Gremlin collect all first level Vertices if the second level vertex has a specific property如果第二级顶点具有特定属性,则 Gremlin 会收集所有第一级顶点
【发布时间】:2021-07-22 16:13:41
【问题描述】:

我的图表看起来像

A,我需要收集所有连接到CB,即B1、B2、..BN,并且C具有特定的属性值。

【问题讨论】:

    标签: gremlin


    【解决方案1】:

    如果没有实际数据,这可能不太正确,但我认为您正在寻找这样的东西:

    g.V().hasLabel('A').
      out().hasLabel('B').
      where(out().hasLabel('C').has('someprop','somevalue'))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多