Gremlin Query Language – Create Vertex/Node and Edge/Relationship
Open Gremlin Console Initial command to work/test with inmemory storage graph = TitanFactory.build().set('storage.backend','inmemory').open() g=graph.traversal(standard()) Example 1: Create Vertex. Label property is optional. The below queries will return vertex references. graph.addVertex('property1','value1','property2','value2'); OR graph.addVertex(label,'USER','property1','value1','property2','value2'); OR graph.addVertex(T.label,'USER','property1','value1','property2','value2'); OR graph.addVertex(T.label,'USER').property('property1','value1').property('property2','value2'); OR graph.addVertex('LABEL_NAME'); Example 2: Create Edge with/without properties using system generated unique ID g.V(123).next().addEdge('EDGE_LABEL',g.V(456).next()) OR g.E(g.V(123).next().addEdge('EDGE_LABEL',g.V(456).next())).property('property1','value1').property('property2','value2') Example 3: Create Edge with/without… Read More »
Read more
Import Data from Mongo DB to Elasticsearch using Elasticsearch River
Importing data from Mongo DB to Elasticsearch requires Mongo DB to have replica set enabled. Once the replica set is enabled, Mongo DB populates the oplog (operation log) as and when we add documents to the collection in the database (except database named local, which is used by Mongo DB to… Read More »
Read more
Class Rating in Memory Cards – ALL YOU NEED TO KNOW
Memory cards are one of the most popular storage device which are used in portable electronic devices like smartphones, digital cameras, portable gaming consoles(PSP, Nvidia Shield etc), MP3 players etc. The revolution in science and technology has made made the memory card into very small chip with greater storage capacity ranging from megabytes… Read More »
Read more
[ CONNECT WITH US ]