mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
more replacements and patches to migrate this module to 4.0
This commit is contained in:
parent
bbdf79ea2b
commit
7c27484d24
@ -339,7 +339,9 @@ class Solr_Reindex extends Solr_BuildTask
|
|||||||
*/
|
*/
|
||||||
protected function getHandler()
|
protected function getHandler()
|
||||||
{
|
{
|
||||||
return Injector::inst()->get('SolrReindexHandler');
|
//@todo: this needs to determine the best class from a Factory implementation
|
||||||
|
//@todo: it was 'SolrReindexHandler' but that doesn't work on 4.0
|
||||||
|
return Injector::inst()->get('SolrReindexImmediateHandler');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -397,6 +399,7 @@ class Solr_Reindex extends Solr_BuildTask
|
|||||||
// If not using queuedjobs, we need to invoke Solr_Reindex as a separate process
|
// If not using queuedjobs, we need to invoke Solr_Reindex as a separate process
|
||||||
// Otherwise each group is processed via a SolrReindexGroupJob
|
// Otherwise each group is processed via a SolrReindexGroupJob
|
||||||
$groups = $request->getVar('groups');
|
$groups = $request->getVar('groups');
|
||||||
|
|
||||||
$handler = $this->getHandler();
|
$handler = $this->getHandler();
|
||||||
if ($groups) {
|
if ($groups) {
|
||||||
// Run grouped batches (id % groups = group)
|
// Run grouped batches (id % groups = group)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
Solr::include_client_api();
|
Solr::include_client_api();
|
||||||
|
use SilverStripe\Core\Config\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The API for accessing a specific core of a Solr server. Exactly the same as Apache_Solr_Service for now.
|
* The API for accessing a specific core of a Solr server. Exactly the same as Apache_Solr_Service for now.
|
||||||
|
Loading…
Reference in New Issue
Block a user