Skip to content
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 in adding vertex to elastic graph #110

Open
zxnblake opened this issue Nov 8, 2017 · 1 comment
Open

Failed in adding vertex to elastic graph #110

zxnblake opened this issue Nov 8, 2017 · 1 comment

Comments

@zxnblake
Copy link

zxnblake commented Nov 8, 2017

It can load the vertex and edge data to graph from my ES store, but I cannot add vertex to it. My code is as follows:
BaseConfiguration conf = new BaseConfiguration();
conf.addProperty("providers", "D:/work/gdb/docs/conf");
UniGraph graph = UniGraph.open(conf);
GraphTraversalSource g = graph.traversal();
graph.addVertex(T.id, "3", T.label, "software", "name", "gremlin");
After reading the code, I found in the StaticPropertySchema, there is the following method:
public Map<String, Object> toFields(Map<String, Object> prop) {
Object o = prop.get(this.key);
if(o == null || o.equals(this.value)) return Collections.emptyMap();
return null;
}
In the method, the key and value is always the V(1) vertext, and my prop of new vertext
is not equal to V(1) props, so this method always return null. And so my vertex will never
be added to ES store.
Anyone can help give an explanation on it?
@seanbarzilay

@seanbarzilay
Copy link
Member

@zxnblake can you provide you mapping file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants