Hi,
I am trying to use the gremlin console with some basic queries.
Using a local graph, I have no problem whatsoever running these:
g=TinkerGraph.open()
x=g.addVertex('name','one')
y=g.addVertex('name','two')
x.property('name',1)
x.property('name')
x.addEdge('needs',y)
Instead, when using a remote graph (I use the titan backend), the same queries don't work anymore
:rem connect tinkerpop.server conf/remote-objects.yaml
:> graph.addVertex('name','one') //cannot use x, returns vertex id, e.g. 1111
:> graph.addVertex('name','two') //cannot use y, returns vertex id, e.g. 2222
:> graph.traversal().V(1111).property('name',1)
:> graph.traversal().V(1111).property('name') //error A
:> graph.traversal().V(1111).addEdge('needs', 2222) //error B
1st error
A: No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.property() is applicable for argument types: (java.lang.String) values: [name]
so I tried
:> graph.traversal().V(1111).properties('name') //Request timed out while processing - increase the timeout with the :remote command
which fails, but oddly enough dropping the same thing works
:> graph.traversal().V(1111).properties('name').drop() //works, property is removed
also, values() seems to work
:> graph.traversal().V(1111).values('name') //ok
Q1: what happens with property() getter?
2nd error
B: No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.addEdge() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [test, 2222]
I also tried
:> graph.traversal().V(1111).addEdge('needs', graph.traversal().V(2222))
which is also incorrect, I get this error
No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.addEdge() is applicable for argument types: (java.lang.String, org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal) values: [cc, [GraphStep([2222],vertex)]]
Q2: how do I add an edge?
Thanks in advance,
regards
Chris