@SuppressWarnings({ "rawtypes", "unchecked" })
protected Object getTargetRepository(RepositoryMetadata metadata) {
SolrOperations operations = this.solrOperations;
if (factory != null) {
SolrTemplate template = new SolrTemplate(factory);
if (this.solrOperations.getConverter() != null) {
template.setMappingContext(this.solrOperations.getConverter().getMappingContext());
}
template.setSolrCore(SolrServerUtils.resolveSolrCoreName(metadata.getDomainType()));
addSchemaCreationFeaturesIfEnabled(template);
template.afterPropertiesSet();
operations = template;
}
SimpleSolrRepository repository = new SimpleSolrRepository(getEntityInformation(metadata.getDomainType()),
operations);