数据集包含各种ID,每个ID在不同的时间戳和Performer有很多事件。
例如
ID, DateStamp, Assignment_Group
ID1, 10:00:00, Group1
ID1, 11:14:36, Group2
ID2, 11:23:34, Group2
ID3, 1:34,23, Group3
.....
我为每个属性创建了节点,并通过关系链接它们
try (Transaction tx = db.beginTx();) {
myNode1[i] = db.createNode();
myNode1[i].setProperty("ID", input_data[0]);
myNode2[i] = db.createNode();
myNode2[i].setProperty("DateStamp", input_data[1]);
relation1=myNode1[i].createRelationshipTo(myNode2[i], OCCURS_AT);
relation1.setProperty("occuredAt", "some time");
myNode3[i] = db.createNode();
myNode3[i].setProperty("Assignment_Group", input_data[2]);
relation2=myNode1[i].createRelationshipTo(myNode3[i], RESOLVED_BY);
relation2.setProperty("ResolvedBy", "some group");
tx.success();
}
我想在myNode1 []的基础上索引记录。想知道这是否可能以及如何实现?
还可以测量查询执行时间吗?目前的方法看起来并不好
long time = System.currentTimeMillis();
result = engine.execute("match (n {Incident_ID: 'ID1'}) return n.Incident_ID");
System.out.println(System.currentTimeMillis() - time + "ms");
提前致谢。