ManagementSystem mgmt = (ManagementSystem) graph.openManagement();
PropertyKey nameProperty = mgmt.makePropertyKey("names").dataType(String.class).cardinality(Cardinality.SET).make();
PropertyKey yoyoProperty = mgmt.makePropertyKey("yoyo").dataType(String.class).cardinality(Cardinality.SET).make();
mgmt.buildIndex("searchName", Vertex.class).addKey(nameProperty, Mapping.STRING.asParameter()).buildMixedIndex("search");
mgmt.buildIndex("searchYoyo", Vertex.class).addKey(yoyoProperty, Mapping.STRING.asParameter()).buildMixedIndex("search");
EdgeLabel directEdgeLabel = mgmt.makeEdgeLabel("edgeL").make();
mgmt.commit();
// Insert a vertex
Vertex person1 = graph.addVertex();
person1.property("names", "p1");
person1.property("names", "p2");
Vertex person2 = graph.addVertex();
person2.property("names", "p5");
person2.property("names", "p6");
Edge edge = person1.addEdge("edgeL", person2);
edge.property("yoyo", "wow");
edge.property("yoyo", "hello");
graph.tx().commit();
Gremlin Output:
gremlin> g.E().valueMap()
==>{yoyo=hello}
gremlin> g.V().valueMap()
==>{names=[p1, p2]}
==>{names=[p5, p6]}
Looks edge property is not supporting SET cardinality.
Please suggest.
~AnkurG
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/99ad8c01-a936-417c-a0e8-17304dba7d0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In the docs, the edge property "place" for the Graph of Gods appears to be a list? Where is my understanding going wrong?