SilverStripe Search

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

Methods

getLogger()

Get the logger

public getLogger() : LoggerInterface
Return values
LoggerInterface

run()

Implement this method in the task subclass to execute via the TaskRunner

public run(HTTPRequest $request) : void
Parameters
$request : HTTPRequest

Current request

Tags
throws
HTTPException
throws
InvalidArgumentException
throws
ValidationException

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

logException()

Log an exception error

private logException(string $index, Exception $error) : void
Parameters
$index : string

Name of the index

$error : Exception
Tags
codeCoverageIgnore

Can't be tested because of accessibility and the actual throw of exception

throws
HTTPException
throws
ValidationException

        
On this page

Search results