}
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()) {
deleteIndex(indexManager.forNodes(ix));
}
for (String ix : indexManager.relationshipIndexNames()) {
deleteIndex(indexManager.forRelationships(ix));