【发布时间】:2014-12-21 12:47:58
【问题描述】:
当我在 gremlin 控制台中执行以下命令时,我得到了预期的结果。
g.V('name', 'a').next().query().has('b', GREATER_THAN_EQUAL, 100).orderBy('timestamp', Order.DESC).edges()
现在我正在尝试从 Java 执行相同的操作(遵循 this 指南)但是我无法让它工作。
我试过了
Pipe pipe = Gremlin.compile("_().query().has('b', GREATER_THAN_EQUAL, 100).orderBy('timestamp', Order.DESC).edges()");
pipe.setStarts(new SingleIterator<Vertex>(graph.getVertices("name", 'a').iterator().next()));
for(Object name : pipe) {
}
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException:没有方法签名: com.tinkerpop.gremlin.groovy.GremlinGroovyPipeline.query() 是 适用于参数类型:() 值:[] 可能的解决方案: 每个(),每个(groovy.lang.Closure),grep(), 树([Lcom.tinkerpop.pipes.PipeFunction;), 树([Lgroovy.lang.Closure;), 树(com.tinkerpop.pipes.util.structures.Tree)
还有这个
Pipe pipe = Gremlin.compile("_().next().query().has('b', GREATER_THAN_EQUAL, 100).orderBy('timestamp', Order.DESC).edges()");
pipe.setStarts(new SingleIterator<Vertex>(graph.getVertices("name", 'a').iterator().next()));
for(Object name : pipe) {
}
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException:没有方法签名: com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.query() 适用于参数类型:() 值:[] 可能的解决方案: 每个(),每个(groovy.lang.Closure),grep(),grep(java.lang.Object), 任何(),转储()
有什么想法吗?
【问题讨论】: