Detailed Description

SearchIndexController creates a Lucene index from the complete datastore.

The controller supports the following actions:

Action default
Create the index.
Parameter Description
in nodesPerCall The number of nodes to process in one call (default: 10)

For additional actions and parameters see BatchController actions.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 46 of file SearchIndexController.php.

+ Inheritance diagram for SearchIndexController:

Public Member Functions

 __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, Search $search)
 
 initialize (Request $request, Response $response)
 
- Public Member Functions inherited from Controller
 __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration)
 
 execute ($method=null)
 
 getRequest ()
 
 getResponse ()
 

Public Attributes

const NODES_PER_CALL = 1
 
const OPTIMIZE_FREQ = 50
 
- Public Attributes inherited from BatchController
const REQUEST_VAR = 'request'
 
const ONE_CALL_VAR = 'oneCall'
 
const STEP_VAR = 'step'
 
const NUM_STEPS_VAR = 'numSteps'
 
const DOWNLOAD_STEP_VAR = 'downloadStep'
 
const PACKAGES_VAR = 'packages'
 
- Public Attributes inherited from Controller
const CSRF_TOKEN_PARAM = 'csrf_token'
 

Protected Member Functions

 getWorkPackage ($number)
 
 collect ($types)
 
 index ($oids)
 
 optimize ($oids)
 
- Protected Member Functions inherited from BatchController
 doExecute ($method=null)
 
 getStepNumber ()
 
 addWorkPackage ($name, $size, array $oids, $callback, $args=null)
 
 processPart ($step)
 
 getRequestValue ($name)
 
 getNumberOfSteps ()
 
 getDisplayText ($step)
 
 getDownloadFile ()
 
 cleanup ()
 
- Protected Member Functions inherited from Controller
 validate ()
 
 executeSubAction ($action)
 
 redirect ($location, $key=null, $data=null)
 
 getLogger ()
 
 getSession ()
 
 getPersistenceFacade ()
 
 getPermissionManager ()
 
 getActionMapper ()
 
 getLocalization ()
 
 getMessage ()
 
 getConfiguration ()
 
 requireTransaction ()
 
 endTransaction ($commit)
 
 isLocalizedRequest ()
 
 checkLanguageParameter ()
 
 generateCsrfToken ($name, $refresh=true)
 
 validateCsrfToken ($name, $invalidate=true)
 
 getLocalSessionValue ($key, $default=null)
 
 setLocalSessionValue ($key, $value)
 
 clearLocalSessionValues ()
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( Session  $session,
PersistenceFacade  $persistenceFacade,
PermissionManager  $permissionManager,
ActionMapper  $actionMapper,
Localization  $localization,
Message  $message,
Configuration  $configuration,
Search  $search 
)

Constructor.

Parameters
$session
$persistenceFacade
$permissionManager
$actionMapper
$localization
$message
$configuration
$search

Definition at line 67 of file SearchIndexController.php.

Member Function Documentation

◆ initialize()

initialize ( Request  $request,
Response  $response 
)
See also
Controller::initialize()

Reimplemented from BatchController.

Definition at line 83 of file SearchIndexController.php.

◆ getWorkPackage()

getWorkPackage (   $number)
protected
See also
BatchController::getWorkPackage()

Reimplemented from BatchController.

Definition at line 98 of file SearchIndexController.php.

◆ collect()

collect (   $types)
protected

Collect all oids of the given types.

Parameters
$typesThe types to process
Note
This is a callback method called on a matching work package
See also
BatchController::addWorkPackage()

Definition at line 129 of file SearchIndexController.php.

◆ index()

index (   $oids)
protected

Create the lucene index from the given objects.

Parameters
$oidsThe oids to process
Note
This is a callback method called on a matching work package
See also
BatchController::addWorkPackage()

Definition at line 149 of file SearchIndexController.php.

◆ optimize()

optimize (   $oids)
protected

Optimize the search index.

Parameters
$oidsThe oids to process
Note
This is a callback method called on a matching work package
See also
BatchController::addWorkPackage()

Definition at line 172 of file SearchIndexController.php.

Member Data Documentation

◆ NODES_PER_CALL

const NODES_PER_CALL = 1

Definition at line 51 of file SearchIndexController.php.

◆ OPTIMIZE_FREQ

const OPTIMIZE_FREQ = 50

Definition at line 54 of file SearchIndexController.php.