SilverStripe Search

SolrIndexTrait

Trait SolrIndexTrait Getters and Setters for the SolrIndexTask

Table of Contents

Properties

$batchLength  : int
Default batch length
$cores  : int
$debug  : bool
Debug mode enabled, default false
$index  : BaseIndex
$service  : SolrCoreService
Singleton of {@link SolrCoreService}

Methods

getBatchLength()  : int
Get the length of a single batch
getCores()  : int
Get the amount of CPU Cores configured
getIndex()  : BaseIndex
Get the Index class.
isDebug()  : bool
Is this Index in debug mode
setBatchLength()  : void
Set the length of a single batch
setCores()  : void
Set the amount of CPU Cores to use
setDebug()  : self
Set the debug mode
setIndex()  : void
Set the index class
setService()  : self
Set the {@link SolrCoreService}

Properties

$batchLength

Default batch length

protected int $batchLength = 500

$debug

Debug mode enabled, default false

protected bool $debug = false

Methods

getBatchLength()

Get the length of a single batch

public getBatchLength() : int
Return values
int

getCores()

Get the amount of CPU Cores configured

public getCores() : int
Return values
int

isDebug()

Is this Index in debug mode

public isDebug() : bool
Return values
bool

setBatchLength()

Set the length of a single batch

public setBatchLength(int $batchLength) : void
Parameters
$batchLength : int

setCores()

Set the amount of CPU Cores to use

public setCores(int $cores) : void
Parameters
$cores : int

setDebug()

Set the debug mode

public setDebug(bool $debug[, bool $force = false ]) : self
Parameters
$debug : bool

Set the task in debug mode

$force : bool = false

Force a task in debug mode, despite e.g. being Live and not CLI

Return values
self

        
On this page

Search results