neo4j/gremlin-plugin — Issue #3: Gremlin Query works in Console but not via REST
Author: Romiko
Created: 2011-11-08 01:29:49+00:00
State: open

Hi Guys,

I can confirm that the gremlin query works in the Console but not in the REST API.

Console Working:

gremlin> g.v(0).outE[[label:'HOSTS']].inV{ it['UniqueId'] == 11761 }.drop(0).take(100)._()
==> v[756]

REST Not Working:

If I do a HTTP POST with this
127.255.0.0:20001/db/data/ext/GremlinPlugin/graphdb/execute_script

HTTP POST
Content[1] = {Accept=application/xml, text/json, text/x-json, text/javascript, text/xml, application/json}
Content [2] =
{
"script": "g.v(p0).outE[[label:p1]].inV{ it[p2] == null }.drop(p3).take(p4)._()",
"params": {
"p0": 0,
"p1": "HOSTS",
"p2": "UniqueId",
"p3": 0,
"p4": 100
}
}

The Response from the above HTTP POST is this:
"javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.tinkerpop.pipes.util.FluentPipeline.inV() is applicable for argument types: (Script10$_run_closure1) values: [Script10$_run_closure1@303a6f8]\nPossible solutions: inV(), in([Ljava.lang.String;), inE([Ljava.lang.String;), V(), id(), find()"

This used to work with Neo4j 1.5M01 release.