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()));
try {
for (String ix : indexManager.nodeIndexNames()) {
final Index<Node> index = indexManager.forNodes(ix);
getMutableIndex(index).delete();
}
for (String ix : indexManager.relationshipIndexNames()) {
final RelationshipIndex index = indexManager.forRelationships(ix);