【发布时间】:2021-01-08 08:43:58
【问题描述】:
这对我很有帮助。 How to increase performance of shortest path using Gremlin?
我想知道如何将这个 gremlin 查询翻译成 gremlin-python
g.V(687).store('x').repeat(out().where(without('x')).aggregate('x')).until(hasId(1343)).limit(1).path()
喜欢...
g.V(687).store('x').repeat(__.out().where(without('x')).aggregate('x')).until(__.hasId(1343)).limit(1).path()
【问题讨论】:
-
可以吗?
from gremlin_python.process.traversal import P g.V(687).store('x').repeat(__.out().where(P.neq('x')).aggregate('x')).until(__.hasId(1343)).limit(1).path() -
发生超时。
where(P.neq('x')).aggregate('x')可能不起作用