SilverStripe\FullTextSearch\Search\Processors\SearchUpdateBatchedProcessor
Provides batching of search updates
Synopsis
class SearchUpdateBatchedProcessor
extends SearchUpdateProcessor
{
- // members
- protected $batches;
- protected $currentBatch;
- protected $completedIndexes;
- private static integer $batch_size = 100;
- private static integer $batch_soft_cap = 10;
- // Inherited members from SearchUpdateProcessor
- protected $dirty;
- // methods
- public void __construct()
- protected void setBatch()
- protected void getSource()
- public boolean process()
- protected array segmentBatches()
- public void batchData()
- public void triggerProcessing()
- // Inherited methods from SearchUpdateProcessor
- public void __construct()
- public void addDirtyIDs()
- protected array prepareIndexes()
- protected bool commitIndex()
- protected array getSource()
- public bool process()
- public abstract void triggerProcessing()
Hierarchy
Extends
Uses
- SilverStripe\Core\Config\Configurable
Members
private
- $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
protected
- $batches
—
array
List of batches to be processed - $completedIndexes
—
array
List of indexes successfully comitted in the current batch - $currentBatch
—
int
Pointer to index of $batches assigned to $current. - $dirty
—
array
List of dirty records to process in format
Methods
protected
- getSource()
- segmentBatches() — Segments batches acording to the specified rules
- setBatch() — Set the current batch index
public
- __construct()
- batchData()
- process() — Process the current queue
- triggerProcessing()
Inherited from SilverStripe\FullTextSearch\Search\Processors\SearchUpdateProcessor
protected
- commitIndex() — Commits the specified index to the Solr service
- getSource() — Gets the record data source to process
- prepareIndexes() — Generates the list of indexes to process for the dirty items
public
- addDirtyIDs()
- process() — Process all indexes, returning true if successful
- triggerProcessing()