newTx(); vs[1] = tx.addVertex("name", "Long Little Lewis", "age", 35); vs[2] = tx.addVertex("name", "Tall Long Tiger", "age", 75); vs[3] = tx.addVertex("name", "Long John Don", "age", 15); newTx(); vs[2] = getV(tx, vs[2]); vs[2].remove(); vs[3].property(VertexProperty.Cardinality.single, "name", "Bad Boy Badsy"); vs[3].property("age").remove(); newTx(); vs[0] = getV(tx, vs[0]); vs[0].property(VertexProperty.Cardinality.single, "age", 66); newTx();
ElementCategory.VERTEX, 1, new boolean[]{false, true}); newTx(); mgmt.addIndexKey(mgmt.getGraphIndex("theIndex"), time, getFieldMap(time)); finishSchema(); newTx(); ElementCategory.VERTEX, 3, new boolean[]{false, true}); newTx(); ElementCategory.VERTEX, 2, new boolean[]{true, true}, "theIndex"); newTx(); finishSchema(); newTx();
assertCount(numV, tx.query().edges()); newTx();
newTx(); vs[1] = tx.addVertex(); vs[2] = tx.addVertex(); ElementHelper.setProperties(vs[2],"name","Tall Long Tiger","age",75); ElementHelper.setProperties(vs[3],"name","Long John Don","age",15); newTx(); vs[2] = tx.getVertex(vs[2].getLongId()); vs[2].remove(); vs[3].setProperty("name","Bad Boy Badsy"); vs[3].removeProperty("age"); newTx(); vs[0] = tx.getVertex(vs[0].getLongId()); vs[0].setProperty("age", 66); newTx();
assertEquals(numV, Iterables.size(tx.getEdges())); newTx();
assertEquals(numV, Iterables.size(tx.getEdges())); newTx();
evaluateQuery(tx.query().has("text",Text.CONTAINS,"rocks").has("time",5).interval("height",100,200), ElementCategory.VERTEX,1,new boolean[]{false,true},"theIndex"); newTx(); mgmt.addIndexKey(mgmt.getGraphIndex("theIndex"),time, getFieldMap(time)); finishSchema(); newTx(); evaluateQuery(tx.query().has("text",Text.CONTAINS,"rocks").has("time",5).interval("height",100,200), ElementCategory.VERTEX,2,new boolean[]{false,true},"theIndex"); newTx(); evaluateQuery(tx.query().has("text",Text.CONTAINS,"rocks").has("time",5).interval("height",100,200), ElementCategory.VERTEX,2,new boolean[]{true,true},"theIndex"); newTx();