mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
SS 4.0 - Update references to thirdparty Solr API as its not namespaced
This commit is contained in:
parent
eac9485924
commit
0b7281b25e
@ -541,7 +541,7 @@ abstract class SolrIndex extends SearchIndex
|
||||
{
|
||||
$includeSubs = $options['include_children'];
|
||||
|
||||
$doc = new Apache_Solr_Document();
|
||||
$doc = new \Apache_Solr_Document();
|
||||
|
||||
// Always present fields
|
||||
|
||||
|
@ -25,7 +25,7 @@ class Solr4Service_Core extends SolrService_Core
|
||||
* @inheritdoc
|
||||
* @see Solr4Service_Core::addDocuments
|
||||
*/
|
||||
public function addDocument(Apache_Solr_Document $document, $allowDups = false,
|
||||
public function addDocument(\Apache_Solr_Document $document, $allowDups = false,
|
||||
$overwritePending = true, $overwriteCommitted = true, $commitWithin = 0
|
||||
) {
|
||||
return $this->addDocuments(array($document), $allowDups, $overwritePending, $overwriteCommitted, $commitWithin);
|
||||
@ -44,7 +44,7 @@ class Solr4Service_Core extends SolrService_Core
|
||||
|
||||
$rawPost = "<add overwrite=\"{$overwriteVal}\"{$commitWithinString}>";
|
||||
foreach ($documents as $document) {
|
||||
if ($document instanceof Apache_Solr_Document) {
|
||||
if ($document instanceof \Apache_Solr_Document) {
|
||||
$rawPost .= $this->_documentToXmlFragment($document);
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ class SolrDocumentMatcher extends Hamcrest_BaseMatcher
|
||||
|
||||
public function describeTo(\Hamcrest_Description $description)
|
||||
{
|
||||
$description->appendText('Apache_Solr_Document with properties '.var_export($this->properties, true));
|
||||
$description->appendText('\Apache_Solr_Document with properties '.var_export($this->properties, true));
|
||||
}
|
||||
|
||||
public function matches($item)
|
||||
{
|
||||
if (! ($item instanceof Apache_Solr_Document)) {
|
||||
if (! ($item instanceof \Apache_Solr_Document)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user