【发布时间】:2017-01-20 11:39:26
【问题描述】:
我正在使用 DSE-5.0.5 和 DSE-studio 并想在笔记本图形内的 gremlin 中编写查询。 是否有一个相交查询可以给我通过 tinkerpop3 中的遍历返回的两个集合之间的共同元素。
我已经写了这个查询:
g.V().has('name','Person1').outE('BELONGS').inV().inE('HAS').outV().as('x').inE(' HAS').outV().as('y').inE('HAS').outV().has('name','App1').select('x').inE('HAS') .outV().hasLabel('Org').as('p').repeat(out()).until(outE().hasLabel('IS')).as('a1').select(' y').inE('HAS').outV().hasLabel('Class').repeat(inE('IS').dedup().otherV()).until(inE().hasLabel('HAS ')).as('a2').select('a1','a2')
所以我想要集合 a1 和 a2 的交集。 或者有没有一种有效的方式来写这个可以给我那个?
【问题讨论】:
标签: datastax-enterprise gremlin tinkerpop tinkerpop3 datastax-enterprise-graph