@Override
@SuppressWarnings("unchecked")
public <T extends PropertyContainer> RestIndex<T> getIndex(String indexName) {
final RestIndexManager index = this.index();
if (index.existsForNodes(indexName)) return (RestIndex<T>) index.forNodes(indexName);
if (index.existsForRelationships(indexName)) return (RestIndex<T>) index.forRelationships(indexName);
throw new IllegalArgumentException("Index " + indexName + " does not yet exist");
}
@Override
@SuppressWarnings("unchecked")