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
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