SolrConfigureTask
extends BuildTask
in package
Uses
LoggerTrait
Class SolrConfigureTask
Table of Contents
Properties
- $description : string
- $logger : LoggerInterface
- The logger to use
- $storeModes : array<string|int, mixed>
- $title : string
- $segment : string
Methods
- __construct() : mixed
- SolrConfigureTask constructor.
- getLogger() : LoggerInterface
- Get the logger
- run() : void
- Implement this method in the task subclass to execute via the TaskRunner
- setLogger() : void
- Set the logger if needed
- configureIndex() : void
- Update the index on the given store
- createConfigForIndex() : ConfigStore
- Get the config and load it to Solr
- getMethod() : string
- Figure out the method needed for the given core.
- getStore() : ConfigStore
- Get the store for the given config
- logException() : void
- Log an exception error
Properties
$description
protected
string
$description
= 'Create or reload a Solr Core by adding or reloading a configuration.'
Description
$logger
The logger to use
protected
LoggerInterface
$logger
$storeModes
protected
static array<string|int, mixed>
$storeModes
= ['file' => \Firesphere\SolrSearch\Stores\FileConfigStore::class, 'post' => \Firesphere\SolrSearch\Stores\PostConfigStore::class]
Available stores
$title
protected
string
$title
= 'Configure Solr cores'
Title
$segment
private
static string
$segment
= 'SolrConfigureTask'
URLSegment
Methods
__construct()
SolrConfigureTask constructor.
public
__construct() : mixed
getLogger()
Get the logger
public
getLogger() : LoggerInterface
Return values
LoggerInterfacerun()
Implement this method in the task subclass to execute via the TaskRunner
public
run(HTTPRequest $request) : void
Parameters
- $request : HTTPRequest
-
Current request
Tags
setLogger()
Set the logger if needed
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
configureIndex()
Update the index on the given store
protected
configureIndex(string $index) : void
Parameters
- $index : string
-
Core to index
createConfigForIndex()
Get the config and load it to Solr
protected
createConfigForIndex(BaseIndex $instance) : ConfigStore
Parameters
- $instance : BaseIndex
Return values
ConfigStoregetMethod()
Figure out the method needed for the given core.
protected
getMethod( $index, SolrCoreService $service) : string
Parameters
- $index :
- $service : SolrCoreService
Return values
stringgetStore()
Get the store for the given config
protected
getStore( $storeConfig) : ConfigStore
Parameters
Return values
ConfigStorelogException()
Log an exception error
private
logException(string $index, Exception $error) : void
Parameters
- $index : string
-
Name of the index
- $error : Exception