Description
Another question rather than an issue; I'm not sure if it pertains to Gremlin in general or to gremlin-client so apologies if I'm posting in the wrong place.
I'd like to define a Geo index and use it from gremlin client; my setup is the stock 1.0.0-hadoop1 release. Starting the server with an empty db I execute the following in gremlin console:
// define a _geo property and index
graph = TitanFactory.open('conf/titan-cassandra-es.properties')
mgmt = graph.openManagement()
mgmt.makePropertyKey('_geo').dataType(Geoshape.class).cardinality(Cardinality.SINGLE).make()
l = mgmt.getPropertyKey('_geo')
mgmt.buildIndex('byGeo', Vertex.class).addKey(l).buildMixedIndex("search")
mgmt.commit()
// test
g = graph.traversal()
g.addVertex(label, 'AP', '_geo', Geoshape.point(45, 50))
g.addVertex(label, 'AP', '_geo', Geoshape.point(45, 55))
g.addVertex(label, 'AP', '_geo', Geoshape.point(45, 60))
g.V().has('_geo', geoWithin(Geoshape.circle(45, 50, 50)))
The geo query succeeds with no warnings so I assume the index was found.
With the server processes still running I wrap the test portion above into a mocha script and issue the same queries via gremlin-client, but I receive
Error: No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.addVertex() is applicable for argument types: (org.apache.tinkerpop.gremlin.structure.T$1, java.lang.String, java.lang.String, com.thinkaurelius.titan.core.attribute.Geoshape) values: [label, AP, _geo, point[45.0,50.0]](Error 597)
I assume the problem is that my gremlin-server is not using the same graph as the gremlin console, so I update my gremlin-server.yaml to open the graph described by conf/titan-cassandra-es.properties and restart, but after doing this much my test doesn't log anything and doesn't return.
I guess I'm still not clear about the relationship between the moving parts :)
Help appreciated.