WIP respect current include path

WIP Namespacing and use on SearchIndex class
This commit is contained in:
elliot sawyer 2017-04-21 11:59:27 +12:00
parent 26b629a6cd
commit 9aac0ff1aa
3 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<?php
namespace FulltextSearch;
namespace SilverStripe\FullTextSearch;
use SilverStripe\View\ViewableData;
use SilverStripe\ORM\DataObject;

View File

@ -154,10 +154,10 @@ class Solr
static $included = false;
if (!$included) {
$solr_php_path = __DIR__. '/../..' . '/thirdparty/solr-php-client';
set_include_path($solr_php_path);
require_once($solr_php_path . DIRECTORY_SEPARATOR . 'Apache/Solr/Service.php');
require_once($solr_php_path . DIRECTORY_SEPARATOR . 'Apache/Solr/Document.php');
$solr_php_path = __DIR__. '/../..' . '/thirdparty/solr-php-client/';
set_include_path(get_include_path() . PATH_SEPARATOR . $solr_php_path);
require_once($solr_php_path . 'Apache/Solr/Service.php');
require_once($solr_php_path . 'Apache/Solr/Document.php');
$included = true;
}

View File

@ -4,6 +4,8 @@ Solr::include_client_api();
use SilverStripe\Dev\BuildTask;
use SilverStripe\Control\Director;
use SilverStripe\FulltextSearch\SearchIndex;
abstract class SolrIndex extends SearchIndex
{
public static $fulltextTypeMap = array(