mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
WIP respect current include path
WIP Namespacing and use on SearchIndex class
This commit is contained in:
parent
26b629a6cd
commit
9aac0ff1aa
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace FulltextSearch;
|
namespace SilverStripe\FullTextSearch;
|
||||||
|
|
||||||
use SilverStripe\View\ViewableData;
|
use SilverStripe\View\ViewableData;
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
|
@ -154,10 +154,10 @@ class Solr
|
|||||||
static $included = false;
|
static $included = false;
|
||||||
|
|
||||||
if (!$included) {
|
if (!$included) {
|
||||||
$solr_php_path = __DIR__. '/../..' . '/thirdparty/solr-php-client';
|
$solr_php_path = __DIR__. '/../..' . '/thirdparty/solr-php-client/';
|
||||||
set_include_path($solr_php_path);
|
set_include_path(get_include_path() . PATH_SEPARATOR . $solr_php_path);
|
||||||
require_once($solr_php_path . DIRECTORY_SEPARATOR . 'Apache/Solr/Service.php');
|
require_once($solr_php_path . 'Apache/Solr/Service.php');
|
||||||
require_once($solr_php_path . DIRECTORY_SEPARATOR . 'Apache/Solr/Document.php');
|
require_once($solr_php_path . 'Apache/Solr/Document.php');
|
||||||
|
|
||||||
$included = true;
|
$included = true;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ Solr::include_client_api();
|
|||||||
|
|
||||||
use SilverStripe\Dev\BuildTask;
|
use SilverStripe\Dev\BuildTask;
|
||||||
use SilverStripe\Control\Director;
|
use SilverStripe\Control\Director;
|
||||||
|
use SilverStripe\FulltextSearch\SearchIndex;
|
||||||
|
|
||||||
abstract class SolrIndex extends SearchIndex
|
abstract class SolrIndex extends SearchIndex
|
||||||
{
|
{
|
||||||
public static $fulltextTypeMap = array(
|
public static $fulltextTypeMap = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user