【问题标题】:Gremlin union method throws exception using otherV methodGremlin union 方法使用 otherV 方法抛出异常
【发布时间】:2014-12-04 16:52:43
【问题描述】:

我运行了这些代码:

  1. g.V().has("name", "Jones").union(g.of().bothE("knows").inV()).values()
  2. g.V().has("name", "Jones").union(g.of().bothE("knows").otherV()).values()

第一个正确返回,但也带来了琼斯。 第二个抛出异常,如下所示:

Path tracking is not supported by this Traverser: class com.tinkerpop.gremlin.process.traversers.SimpleTraverser

谁能帮我解决这个问题?

谢谢, 塞尔索

【问题讨论】:

    标签: gremlin tinkerpop


    【解决方案1】:

    嗯。短期修复是在 V() 之后的 withPath()。 (假设 TP 3.0.0.M6)。

    【讨论】:

    • 我正在使用 TP 3.0.0.M5。我明天早上(在巴西)试试,我会告诉你这是否解决了我的问题。谢谢马尔科
    • Marko,我下载了 gremlin-console-3.0.0.M6,但是当我尝试运行 .bat 时,它会抛出:Caused by: java.lang.ClassNotFoundException: com.tinkerpop.gremlin.groovy.plugin.RemoteAcceptor。请问你能帮帮我吗?谢谢。
    • 我将 gremlin-groovy-3.0.0.M6.jar 包含在 lib 文件夹中,它解决了这个问题。是部署问题还是我忘记了什么?
    【解决方案2】:

    我不认为这是预期的行为,但你为什么要使用 union 呢?为什么不简单:

    g.V().has("name", "Jones").bothE("knows").otherV().values()
    

    【讨论】:

    • 哦,对不起...我刚刚删除了一些代码,但主要思想是在一个“查询”中加入不同类型的关系。谢谢@daniel-kupptiz
    猜你喜欢
    • 1970-01-01
    • 2014-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-31
    相关资源
    最近更新 更多