为什么这个查询超时?
Why is this query timing out?
我正在尝试更新顶点及其所有子项。我不确定为什么会超时。
v = g.V().has('a', 'id', '1').next()"
"v.property('status', '0')"
"g.V(v).out('e').repeat(property('status', '0'))"
我假设你想用 "status" 的“0”更新顶点及其所有 children,如果是这样,那么你只需要做:
g.V().has('a','id','1')
property('status','0').
repeat(out('e').property('status','0'))
至于为什么它可能会超时,您可能会更仔细地查看您的数据,看看您是否在某处有一个循环(即 child 是否以某种方式指向祖先?)。我也会考虑用 until()
或 times()
设置一个限制,看看你是否能找出遍历的深度。
我正在尝试更新顶点及其所有子项。我不确定为什么会超时。
v = g.V().has('a', 'id', '1').next()"
"v.property('status', '0')"
"g.V(v).out('e').repeat(property('status', '0'))"
我假设你想用 "status" 的“0”更新顶点及其所有 children,如果是这样,那么你只需要做:
g.V().has('a','id','1')
property('status','0').
repeat(out('e').property('status','0'))
至于为什么它可能会超时,您可能会更仔细地查看您的数据,看看您是否在某处有一个循环(即 child 是否以某种方式指向祖先?)。我也会考虑用 until()
或 times()
设置一个限制,看看你是否能找出遍历的深度。