mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
API Moved module paths from /solr to /fulltextsearch
This commit is contained in:
parent
afaf3071d4
commit
c464c826d0
@ -59,15 +59,15 @@ class Solr {
|
||||
|
||||
/**
|
||||
* Include the thirdparty Solr client api library. Done this way to avoid issues where code is called in mysite/_config
|
||||
* before solr/_config has a change to update the include path.
|
||||
* before fulltextsearch/_config has a change to update the include path.
|
||||
*/
|
||||
static function include_client_api() {
|
||||
static $included = false;
|
||||
|
||||
if (!$included) {
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . Director::baseFolder() . '/solr/thirdparty/solr-php-client');
|
||||
require_once('Apache/Solr/Service.php');
|
||||
require_once('Apache/Solr/Document.php');
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . Director::baseFolder() . '/fulltextsearch/thirdparty/solr-php-client');
|
||||
|
||||
$included = true;
|
||||
}
|
||||
@ -97,7 +97,7 @@ class Solr_Configure extends BuildTask {
|
||||
|
||||
file_put_contents("$confdir/schema.xml", $instance->generateSchema());
|
||||
|
||||
foreach (glob(Director::baseFolder().'/solr/conf/extras/*') as $file) {
|
||||
foreach (glob(Director::baseFolder().'/fulltextsearch/conf/extras/*') as $file) {
|
||||
if (is_file($file)) copy($file, $confdir.'/'.basename($file));
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ class Solr_Configure extends BuildTask {
|
||||
|
||||
WebDAV::upload_from_string($instance->generateSchema(), "$confdir/schema.xml");
|
||||
|
||||
foreach (glob(Director::baseFolder().'/solr/conf/extras/*') as $file) {
|
||||
foreach (glob(Director::baseFolder().'/fulltextsearch/conf/extras/*') as $file) {
|
||||
if (is_file($file)) WebDAV::upload_from_file($file, $confdir.'/'.basename($file));
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ abstract class SolrIndex extends SearchIndex {
|
||||
);
|
||||
|
||||
function generateSchema() {
|
||||
return $this->renderWith(Director::baseFolder() . '/solr/conf/templates/schema.ss');
|
||||
return $this->renderWith(Director::baseFolder() . '/fulltextsearch/conf/templates/schema.ss');
|
||||
}
|
||||
|
||||
function getIndexName() {
|
||||
@ -31,7 +31,7 @@ abstract class SolrIndex extends SearchIndex {
|
||||
}
|
||||
|
||||
function getTypes() {
|
||||
return $this->renderWith(Director::baseFolder() . '/solr/conf/templates/types.ss');
|
||||
return $this->renderWith(Director::baseFolder() . '/fulltextsearch/conf/templates/types.ss');
|
||||
}
|
||||
|
||||
function getFieldDefinitions() {
|
||||
|
Loading…
Reference in New Issue
Block a user