2

頂点 ID のリストがあります。それらの間で可能なすべてのエッジを取得したい。

ここで filter/where のようなメソッドが役立つことは理解していますが、gremlin-python を使用しているため、それらの実装は異なる必要があります。

私が試してみました :

a = [0,2,4,6,8,10]

g.V(a).outE().inV().hasId(a).toList()
# This gives me []

g.V(a).bothE().filter(otherV().hasId(a)).toSet()
# Traceback otherV is not defined

g.V(a).bothE().otherV().hasId(a).toList()
# This gives me []

# Some information on edges :
g.E().toList()
# [e[16][0-Likes->8], e[17][8-Likes->0], e[18][4-Likes->8], e[19][2-Likes->6], e[20][6-Likes->2], e[21][12-Likes->10], e[22][10-Likes->12], e[23][10-Likes->14], e[24][14-Likes->8], e[25][6-Likes->4]]

どうすればこれを達成できますか?簡単な問題のように思えますが、それでも私はそれに行き詰まっています。

4

1 に答える 1