ePages 6.15.1 - DE_EPAGES/RemoteSearch/API/Object/IndexManager.pm

Package DE_EPAGES::RemoteSearch::API::Object::IndexManager

Package used to control shop index creation and remote search settings. Catches errors and saves them as warnings. Use DE_EPAGES::Core::API::Warning::BlockWarnings to handle warnings.

Example
my $ManagerParams = DE_EPAGES::RemoteSearch::API::Object::IndexManagerParams->new(
  create => 1
);
my $Manager = DE_EPAGES::RemoteSearch::API::Object::IndexManager->new(params => $ManagerParams);
my $aWarnings = BlockWarnings(sub {
  $Manager->manageShopsByAlias(['DemoShop']);
});

Functions

manageCompleteDB
manageShopsByAlias
manageShopsByGUID
manageShopsByIndexStatus
manageSystem
new

manageCompleteDB

Works on all shops within the /Shops folder

Syntax
$Manager->manageCompleteDB();

manageShopsByAlias

Works on shops by alias. If irst alias equals 'ALL' than all shops in store processed.

Syntax
 $manager->manageShopsByAlias($aAliases );
Example
 $manager->manageShopsByAlias([ 'Shop1', 'Shop2' ] );
Input
$aAliases (ref.array.string)
Alias list

manageShopsByGUID

works on shops by guid

Syntax
$Manager->manageShopsByGUID( $aGUIDs );
Example
$Manager->manageShopsByGUID( [ 'GUID1', 'GUID2' ] );
Input
$aGUIDs (ref.array.string)
GUID list

manageShopsByIndexStatus

Works on shops based on the current index status See DE_EPAGES::RemoteSearch::API::IndexStatus

Syntax
$manager->manageShopsByIndexStatus( INDEXSTATUS_ERROR );
Input
$IndexStatus (string)
Index status

manageSystem

Sets system parameters.

Syntax
$Manager->manageSystem();

new

Execute various index management tasks. Tasks modify remote search related attributes on Shop/RootObject and/or communicate with remote search service host.

Syntax
my $IndexManager = DE_EPAGES::RemoteSearch::API::Object::IndexManager->new(params => $Params);
Input
%params (hash)
Initial values. Used keys:
  • params - index manager params - DE_EPAGES::RemoteSearch::API::Object::IndexManagerParams
Return
$IndexManager (DE_EPAGES::RemoteSearch::API::Object::IndexManager)
new instance