return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forNodes(indexName));
Index<Node> index = indexManager.forNodes(indexName, indexConfigFor(indexType));
return (Index<T>) index;
} else {
if (indexManager.existsForRelationships(indexName))
return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forRelationships(indexName));
return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(indexType));
}
} finally {
tx.success();tx.close();
}