mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Use full namespaced core for index and commit actions
This commit is contained in:
parent
0764c0ed1e
commit
9153365313
@ -76,17 +76,13 @@ class SolrService extends SolrService_Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new Solr3Service_Core instance for the passed core
|
* Create a new Solr4Service_Core instance for the passed core
|
||||||
* @param $core string - The name of the core
|
* @param $core string - The name of the core
|
||||||
* @return Solr3Service_Core
|
* @return Solr4Service_Core
|
||||||
*/
|
*/
|
||||||
public function serviceForCore($core)
|
public function serviceForCore($core)
|
||||||
{
|
{
|
||||||
// Unencode the class name
|
|
||||||
$core = SolrIndex::getClassNameFromIndex($core);
|
|
||||||
|
|
||||||
$klass = Config::inst()->get(get_called_class(), 'core_class');
|
$klass = Config::inst()->get(get_called_class(), 'core_class');
|
||||||
$coreName = ClassInfo::shortName($core);
|
return new $klass($this->_host, $this->_port, $this->_path . $core, $this->_httpTransport);
|
||||||
return new $klass($this->_host, $this->_port, $this->_path . $coreName, $this->_httpTransport);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user