Package DE_EPAGES::RemoteSearch::API::Object::ProductBatchProcessHandler
Handles batch-updates of products to pass them to the remote search.
Implements Interface DE_EPAGES::Trigger::API::Object::BatchProcessHandler
Uses DE_EPAGES::RemoteSearch::API::Object::SearchIndex
Base |
DE_EPAGES::Trigger::API::Object::BatchProcessHandler |
Functions
addItem
Wrapper for DE_EPAGES::Trigger::API::Object::BatchProcessHandler::addItem Item (Product) is only added if $Item->id is not found in $Handler->items
Syntax |
$Handler->addItem( $NewItem ); |
Input |
|
new
Pass optional parameter 'BatchSize' to define the
number of items queued before processItemList() is called
automatically. Call processItemList() manualy before discarding the Handler
to ensure that all items are processed.
see DE_EPAGES::Trigger::API::Object::BatchProcessHandler for inherited methods
Syntax |
my $Handler = DE_EPAGES::RemoteSearch::API::Object::ProductBatchProcessHandler->new( {BatchSize => 50} ); my $Handler = DE_EPAGES::RemoteSearch::API::Object::ProductBatchProcessHandler->new(); |
Input |
|
Return |
|
processItemList
Stored products are passed to SearchIndex object and flushed.
On first call of this method the search initialized with
parameters from first Object in item list.
see DE_EPAGES::RemoteSearch::API::Object::SearchIndex.
Syntax |
$Handler->processItemList(); |
productBatchSize
The amount of items in one chunk
Syntax |
$ProductBatchSize = $Handler->productBatchSize(); |
Return |
|
reindexThreshold
Returns the treshold when the reindex should be used. Instead of single product update.
Syntax |
$ReindexThreshold = $Handler->ReindexThreshold(); |
Return |
|