@Test
public void testAddToIndex() throws Exception {
Map<String, String> config = TimelineIndexProvider.CONFIG;
IndexManager indexMan = db.index();
Index<Node> index = indexMan.forNodes("timeline1", config);
assertNotNull(index);
Transaction tx = db.beginTx();
Node n1 = db.createNode();
n1.setProperty("time", 123);
index.add(n1, "timestamp", 123L);
Node n2 = db.createNode();
n2.setProperty("time", 123);
index.add(n2, "timestamp", 123L);
Node n3 = db.createNode();
n3.setProperty("time", 124);
index.add(n3, "timestamp", 124L);
tx.success();
tx.finish();
GraphvizWriter writer = new GraphvizWriter();
writer.emit(System.out, Walker.fullGraph(db));
IndexHits<Node> hits = index.get("timestamp", 123L);
assertEquals(2, hits.size());
hits = index.query("[122 TO 125]");
assertEquals(3, hits.size());
ExecutionEngine engine = new ExecutionEngine(db);
ExecutionResult result = engine.execute("start n=node:timeline1('[100 TO 200]') return n");
System.out.println(result.toString());
}