【问题标题】:without step translate to gremlin python无步骤转换为 gremlin python
【发布时间】: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') 可能不起作用

标签: gremlin gremlin-server


【解决方案1】:

您应该能够在 Python 代码中使用 P.without

【讨论】:

    猜你喜欢
    • 2021-08-31
    • 1970-01-01
    • 2017-11-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-30
    • 1970-01-01
    相关资源
    最近更新 更多