result.put("relationships", relationships);
}
private void clearIndex(Map<String, Object> result) {
IndexManager indexManager = graph.index();
result.put("node-indexes", Arrays.asList(indexManager.nodeIndexNames()));
result.put("relationship-indexes", Arrays.asList(indexManager.relationshipIndexNames()));
for (String ix : indexManager.nodeIndexNames()) {
indexManager.forNodes(ix).delete();
}
for (String ix : indexManager.relationshipIndexNames()) {
indexManager.forRelationships(ix).delete();
}
}