include/SugarSearchEngine/SugarSearchEngineIndexerBase.php

Show: inherited
Table of Contents

\SugarSearchEngineIndexerBase

Package: SugarCRM

Base class of full text search Indexer

Parent(s)
\RunnableSchedulerJob
Children
\SugarSearchEngineSyncIndexer
\SugarSearchEngineFullIndexer
Api
 

Constants

Constant  MAX_BULK_THRESHOLD = 5000

The max number of beans we process before starting to bulk insert so we dont hit memory issues.

Constant  MAX_BULK_QUERY_THRESHOLD = 15000

The max number of beans we process before starting to bulk insert so we dont hit memory issues.

Constant  MAX_BULK_DELETE_THRESHOLD = 3000

The max number of beans we delete at a time

Constant  POSTPONE_JOB_TIME = 20

Number of time to postpone a job by so it's not executed twice during the same request.

Constant  QUEUE_TABLE = 'fts_queue'

The name of the queue table

Properties

Propertyprotected\SugarSearchEngineAbstractBase  $SSEngine= ''

Propertyprotected\DBManager  $db= ''

Details
Type
\DBManager
Propertyprotected\SchedulersJob  $schedulerJob= ''

Details
Type
\SchedulersJob
Propertyprotected\table_name  $table_name= ''

Details
Type
\table_name

Methods

methodpublic__construct( \SugarSearchEngineAqbstractBase $engine = null ) : void

Parameters
Name Type Description
$engine \SugarSearchEngineAqbstractBase
methodpublic__get(  $name ) : void

Parameters
Name Type Description
$name
methodprotectedgenerateFTSQuery(  $module,  $fieldDefinitions ) : string

Generate the query necessary to retrieve FTS enabled fields for a bean.

Parameters
Name Type Description
$module
$fieldDefinitions
Returns
Type Description
string
methodprotectedmarkBeansProcessed( \$beanIDs $beanIDs ) : void

Given a set of bean ids processed from the queue table, mark them as being processed. We will throttle the update query as there is a limit on the size of records that can be passed to an in clause yet we don't want to update them individually for performance reasons.

Parameters
Name Type Description
$beanIDs \$beanIDs

array of bean ids to delete

methodpublicrun(  $data ) : void

Main function that handles the indexing of a bean and is called by the job queue system.

Subclasses should implement their own logic.

Parameters
Name Type Description
$data
methodprivatesetBeanIDsProcessed(  $deleteIDs ) : void

Internal function to mark records within queue table as processed.

Parameters
Name Type Description
$deleteIDs
methodpublicsetJob( \SchedulersJob $job ) : void

Set the scheduler job that initiated the run call.

Parameters
Name Type Description
$job \SchedulersJob
Documentation was generated by DocBlox 0.18.1.