-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed with gremlin traversal on Edge operation #114
Comments
I have found the issue: we should provide the "outId" and "inId" property in the edge mapping both in config file and the edge index in ES. The code will try to find the outId/inId property when forming an edge in the graph. |
@zxnblake I didn't understand you completely but in your mapping file you haven't provide id properties for both inVertex and outVertex |
Sorry for the wrong config file.. The following one is working: { |
You're missing a "@" in your inVertex id property |
HI @seanbarzilay:
I am trying the gremlin traversal with unipop-elastic. I can load data from ES into graph, and the code < graph.traversal().V("1").next().value("name") > is working well, but the following code is not working:
GraphTraversal<Edge, Edge> et = graph.traversal().E("1");
Edge edges = et.next();
It always throws out the following error:
java.util.NoSuchElementException
org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:204)
at org.unipop.elastic.tests.ConfigurationTests.upsertConfiguration(ConfigurationTests.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
When I debug into the code(ElasticClient.execute(action)), I can see that the query for edge with id=1 is successful, and I can see the following search result with json:
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"edge","_type":"default","_id":"1","_score":1.0,"_source":{"inVertex":{"ref":"true","id":"548","label":"person"},"label":"knows","outVertex":{"ref":"true","id":"1","label":"person"}}}]}}
It seems that the edge and its inVertex and outVertex have been fetched from ES store already.
Why it always failed in executing the et.next(); or et.inV().next()?
The text was updated successfully, but these errors were encountered: