【发布时间】:2018-08-02 14:12:43
【问题描述】:
我想使用 Java 中的 Gremlin 在 JanusGraph 中为通过带有 some label 的边连接的所有顶点修改 some property。我尝试了以下方法:
public void setAllProperties(JanusGraphTransaction janusGraphTransaction) {
GraphTraversal<Vertex, Vertex> traversal = janusGraphTransaction.traversal().V();
traversal.has("SomeLabel", "SomeProperty", 0)
.repeat(out("SomeEdgeLabel"))
.property("SomeProperty", true)
.until(outE("SomeEdgeLabel").count().is(0));
}
但没有修改任何顶点。我尝试使用谷歌搜索修改属性,同时使用 repeat... until 但没有任何成功。有什么建议吗?
【问题讨论】:
标签: gremlin tinkerpop janusgraph