@Override
public <T extends PropertyContainer> Index<T> getIndex(String indexName) {
IndexManager indexManager = delegate.index();
if (indexManager.existsForNodes(indexName)) return (Index<T>) indexManager.forNodes(indexName);
if (indexManager.existsForRelationships(indexName)) return (Index<T>) indexManager.forRelationships(indexName);
throw new NoSuchIndexException(indexName);
}