include/SugarSearchEngine/SugarSearchEngineIndexerBase.php
\SugarSearchEngineIndexerBase
Base class of full text search Indexer
- Parent(s)
- \RunnableSchedulerJob
- Children
- \SugarSearchEngineSyncIndexer
- \SugarSearchEngineFullIndexer
- Api
Constants
MAX_BULK_THRESHOLD
= 5000The max number of beans we process before starting to bulk insert so we dont hit memory issues.
MAX_BULK_QUERY_THRESHOLD
= 15000The max number of beans we process before starting to bulk insert so we dont hit memory issues.
POSTPONE_JOB_TIME
= 20Number of time to postpone a job by so it's not executed twice during the same request.
Properties
Methods

__construct(
\SugarSearchEngineAqbstractBase $engine
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $engine | \SugarSearchEngineAqbstractBase |

generateFTSQuery(
$module, $fieldDefinitions
)
:
stringGenerate the query necessary to retrieve FTS enabled fields for a bean.
| Name | Type | Description |
|---|---|---|
| $module | ||
| $fieldDefinitions |
| Type | Description |
|---|---|
| string |

markBeansProcessed(
\$beanIDs $beanIDs
)
:
voidGiven 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.
| Name | Type | Description |
|---|---|---|
| $beanIDs | \$beanIDs | array of bean ids to delete |

run(
$data
)
:
voidMain function that handles the indexing of a bean and is called by the job queue system.
Subclasses should implement their own logic.
| Name | Type | Description |
|---|---|---|
| $data |

setBeanIDsProcessed(
$deleteIDs
)
:
voidInternal function to mark records within queue table as processed.
| Name | Type | Description |
|---|---|---|
| $deleteIDs |

setJob(
\SchedulersJob $job
)
:
voidSet the scheduler job that initiated the run call.
| Name | Type | Description |
|---|---|---|
| $job | \SchedulersJob |