ePages 7.3.0 - DE_EPAGES/RemoteSearch/API/Object/SearchIndex.pm

Package DE_EPAGES::RemoteSearch::API::Object::SearchIndex

object interface for SearchIndex.

Base
DE_EPAGES::Object::API::Object::Object

Functions

className
dbPackage
deleteItems
deleteItemsByGUID
drop
getUpdateTask
initialize
initializeNoSolr
isActive
isLogging
logContextString
logger
remoteIndex
remoteSearch
remoteSuggest
updateIndexStatus
updateItems
updateItemsByGUID
usableAtStorefront

className

Returns the class name, used for DAL access.

Syntax
my $ClassName = $SearchIndex->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
my $DbPackage = $SearchIndex->dbPackage;
Return
$DbPackage (String)
database package name

deleteItems

Deletes objects from the search index

Syntax
$Index->deleteItems( $aObjects );
Input
$aObjects (ref.array.object)
objects to delete
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
resulting task

deleteItemsByGUID

Deletes products from the search index

Syntax
$Index->deleteItemsByGUID( $aObjectGUIDs );
Input
$aObjectGUIDs (ref.array.string)
product GUIDs to delete
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
resulting task

drop

Drops the remote index

Syntax
$Index->drop();
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
resulting task

getUpdateTask

Fetches the update task referenced in #UpdateTaskURL attribute.

Syntax
my $Task = $Index->getUpdateTask();
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
task object

initialize

Initialize search index, initiating a remote init call and saving the task.

Syntax
$Index->initialize();
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
resulting task
Hook
API_RemoteSearchCreateOrReplaceIndex
hook parameter keys :
  • Object - this object - object
  • Task - remote task - DE_EPAGES::RemoteSearch::API::DTO::Task

initializeNoSolr

update shop collection only, solr is not involvedk.

Syntax
$Index->initializeNoSolr();

isActive

Returns true, if remote search is enabled on system level and on shop level. Use method usableAtStorefront to check if the remote search should be used in the storefront.

Syntax
my $isActive = $Index->isActive();
Return
$isActive (boolean)
true if remote search is active for this shop

isLogging

Use to check if logging is enabled.

Syntax
my $isLogging = $Index->isLogging();
Return
$isLogging (boolean)
true if logging is enabled

logContextString

Returns object context string based on storename, object path and shop GUID, used for logging.

Syntax
my $ContextString = $Index->logContextString();
Return
$ContextString (string)
context string

logger

Returns a logger object used for communication logging

Syntax
my $Logger = $Index->logger();
Return
$Logger (DE_EPAGES::EPagesJ::API::Object::CommunicationLogger)
logger object, can be a dummy object, if logging is disabled

remoteIndex

returns the remote adapter object used for managing the remote index. See DE_EPAGES::RemoteSearch::API::Object::RemoteIndexClient

Syntax
my $RemoteIndex = $Index->remoteIndex();
Return
$RemoteIndex (DE_EPAGES::RemoteSearch::API::Object::RemoteIndexClient)
remote adapter object

remoteSearch

returns the remote adapter object used for calling the search webservice. See DE_EPAGES::RemoteSearch::API::Object::SearchClient

Syntax
my $RemoteSearch = $Index->remoteSearch();
Return
$RemoteSearch (DE_EPAGES::RemoteSearch::API::Object::SearchClient)
remote adapter object

remoteSuggest

returns the remote adapter object used for calling the suggestion webservice. See DE_EPAGES::RemoteSearch::API::Object::SuggestClient

Syntax
my $RemoteSuggest = $Index->remoteSuggest();
Return
$RemoteSuggest (DE_EPAGES::RemoteSearch::API::Object::SuggestClient)
remote adapter object

updateIndexStatus

Updates the local index status based on the task status. The Task URL can be retrieved by listening to the Hook 'API_RemoteSearchUpdateTaskStatus'.

Syntax
$Index->updateIndexStatus( $Task );
Input
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
task
Hook
API_RemoteSearchUpdateTaskStatus
hook parameter keys :
  • Object - this object - object
  • Task - remote task - DE_EPAGES::RemoteSearch::API::DTO::Task

updateItems

Updates or inserts a list of objects within search index.

Syntax
$Index->updateItems( $aObjects );
Input
$aObjects (ref.array.object)
objects to update
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
resulting task

updateItemsByGUID

Updates or inserts a list of objects within search index.

Syntax
$Index->updateItemsByGUID( $aObjectGUIDs );
Input
$aObjectGUIDs (ref.array.string)
object GUIDs to update
Return
$Task (DE_EPAGES::RemoteSearch::API::DTO::Task)
resulting task

usableAtStorefront

Returns true, if the search is usable at the storefront. This depends on isActive and on the actual indexstatus of the shop. In TLEs, use #IsUsableAtStorefront.

Syntax
my $usableAtStorefront = $Index->usableAtStorefront( );
Return
$usableAtStorefront (boolean)
true if search is usable