abstract class SearchUpdateBatchedProcessor extends SearchUpdateProcessor (View source)

Provides batching of search updates

Traits

Provides extensions to this object to integrate it with standard config API methods.

Config options

batch_size int

Maximum number of record-states to process in one batch.

batch_soft_cap int

Up to this number of additional ids can be added to any batch in order to reduce the number of batches

Properties

protected array $dirty

List of dirty records to process in format

from  SearchUpdateProcessor
protected array $batches

List of batches to be processed

protected int $currentBatch

Pointer to index of $batches assigned to $current.

protected array $completedIndexes

List of indexes successfully comitted in the current batch

Methods

public
__construct()

No description

public
addDirtyIDs($class, $statefulids, $index)

No description

protected
array
prepareIndexes()

Generates the list of indexes to process for the dirty items

protected
bool
commitIndex(SolrIndex $index)

Commits the specified index to the Solr service

protected
array
getSource()

Gets the record data source to process

public
bool
process()

Process the current queue

public
triggerProcessing()

No description

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
stat(string $name) deprecated

Get inherited config value

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public
$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

protected
setBatch(int $batch)

Set the current batch index

protected
array
segmentBatches(array $source)

Segments batches acording to the specified rules

public
batchData()

No description

Details

__construct()

No description

addDirtyIDs($class, $statefulids, $index)

No description

Parameters

$class
$statefulids
$index

protected array prepareIndexes()

Generates the list of indexes to process for the dirty items

Return Value

array

protected bool commitIndex(SolrIndex $index)

Commits the specified index to the Solr service

Parameters

SolrIndex $index

Index object

Return Value

bool

Flag indicating success

protected array getSource()

Gets the record data source to process

Return Value

array

bool process()

Process the current queue

Return Value

bool

Flag indicating success

triggerProcessing()

No description

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

protected setBatch(int $batch)

Set the current batch index

Parameters

int $batch

Index of the batch

protected array segmentBatches(array $source)

Segments batches acording to the specified rules

Parameters

array $source

Source input

Return Value

array Batches

batchData()

No description