【问题标题】:finds all the paths between a group of defined vertices in datastax dse graph在 datastax dse 图中查找一组已定义顶点之间的所有路径
【发布时间】:2017-01-26 20:26:36
【问题描述】:

根据 this 以下查询:

g.V(ids).as("a").repeat(bothE().otherV().simplePath()).times(5).emit(hasId(within(ids))).as("b").filter(select(last,"a","b").by(id).where("a", lt("b"))).path().by().by(label)

在 datastax 图表中不起作用,因为 lt("b") 部分不能在 json 格式的 datastax id 上工作

{
    '~label=person',
    member_id=54666,
    community_id=505443455
}

如何更改 lt("b) 部分以使查询正常工作?

请帮忙

【问题讨论】:

    标签: datastax datastax-enterprise gremlin datastax-enterprise-graph datastax-search


    【解决方案1】:

    您可以选择任何可比较的属性。例如,如果您的所有顶点都有 name 属性:

    g.V(ids).as("a").repeat(bothE().otherV().simplePath()).times(5).
        emit(hasId(within(ids))).as("b").
      filter(select(last,"a","b").by("name").where("a", lt("b"))).
      path().by().by(label)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-05
      • 1970-01-01
      • 1970-01-01
      • 2011-02-12
      • 1970-01-01
      • 2017-07-03
      相关资源
      最近更新 更多