diff --git a/src/Solr/SolrIndex.php b/src/Solr/SolrIndex.php index ef3a82b..6311a5f 100644 --- a/src/Solr/SolrIndex.php +++ b/src/Solr/SolrIndex.php @@ -3,6 +3,7 @@ namespace SilverStripe\FullTextSearch\Solr; use SilverStripe\Control\Director; +use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Environment; use SilverStripe\FulltextSearch\Search\Indexes\SearchIndex; use SilverStripe\FullTextSearch\Search\Variants\SearchVariant_Caller; @@ -1051,9 +1052,12 @@ abstract class SolrIndex extends SearchIndex */ public function uploadConfig($store) { + // Ensure the short class name is used to match the call which creates the core in SolrService->coreCreate() + $indexName = self::getClassNameFromIndex($this->getIndexName()); + $indexName = ClassInfo::shortName($indexName); // Upload the config files for this index $store->uploadString( - $this->getIndexName(), + $indexName, 'schema.xml', (string)$this->generateSchema() ); @@ -1061,7 +1065,7 @@ abstract class SolrIndex extends SearchIndex // Upload additional files foreach (glob($this->getExtrasPath().'/*') as $file) { if (is_file($file)) { - $store->uploadFile($this->getIndexName(), $file); + $store->uploadFile($indexName, $file); } } }