JanusGraphManagement mgmt = javaGraph.openManagement(); if (mgmt.containsPropertyKey("nodeId")) { nodeId = mgmt.getPropertyKey("nodeId"); } else { nodeId = mgmt.makePropertyKey("nodeId").dataType(Integer.class).make(); }
if(!mgmt.containsGraphIndex("nodeIdInd")){ JanusGraphManagement.IndexBuilder nodeIdIndexBuilder = mgmt.buildIndex("nodeIdInd", Vertex.class).addKey(nodeId); nodeIdIndexBuilder.unique(); JanusGraphIndex nodeIdIdx = nodeIdIndexBuilder.buildCompositeIndex(); }
mgmt.commit();
javaGraph.traversal().V().hasLabel(instanceId).has("nodeId", nodeInfo.getId());
if (vertexNode.hasNext()) { return vertexNode.next(); } else { JanusGraphVertex node = javaGraph.addVertex(instanceId/*, T.id,((Integer)id).longValue()*/); node.property("nodeId", id); return node; }
--
You received this message because you are subscribed to a topic in the Google Groups "JanusGraph users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/janusgraph-users/wnRpz_C5Nk0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/f5f44081-c7a0-4336-ad7c-30b56a372356%40googlegroups.com.