1
如何在一次调用中将一个顶点从一个顶点添加到多个顶点?我知道我可以用通常的addEdge调用一个顶点,但是我想避免为我需要添加的每个边缘调用gremlin服务器,因为可能有很多。添加一个到多个边 - Tinkerpop(3.0.1)
它适用于版本3.2.3,但V方法不适用于版本3.0.1,因此希望以其他方式复制。
// Get vertices I want to add edge to
g.V().has("id",within(["2","3","4"])).as("toV").
// Now get the vertex I want to add edge from
V("1").as("fromV").
// And add an edge between them
addE("likes").from("fromV").to("toV")
你使用哪个版本的TinkerPop?使用v3.2.x,您的最后一个查询应该没问题。 – jbmusso
由于dynamodb存储后端,我暂时停留在3.0.1版本中。 –
答案已更新以反映此情况。 –