Handles searching of posts.
| package | XenForo_Search |
|---|
canViewResult(array $result, array $viewingUser) : boolean
The user and combination ID will be the same as given to getDataForResults().
| see | \XenForo_Search_DataHandler_Abstract::canViewResult() |
|---|
arrayData for a result
arrayInformation about the viewing user (keys: user_id, permission_combination_id, permissions)
booleancreate(string $class) : \XenForo_Search_DataHandler_Abstract
| inherited_from | \XenForo_Search_DataHandler_Abstract::create() |
|---|
stringObject to create
deleteFromIndex(\XenForo_Search_Indexer $indexer, array $dataList)
Wrapper around _deleteFromIndex().
| inherited_from | \XenForo_Search_DataHandler_Abstract::deleteFromIndex() |
|---|
arrayA list of data to remove. This may be one piece of data or multiple. Detection based on whether first element is an array.
filterConstraints(\XenForo_Search_SourceHandler_Abstract $sourceHandler, array $constraints) : array
For example, a "thread only" constraint may change the searchable content types.
| inherited_from | \XenForo_Search_DataHandler_Abstract::filterConstraints() |
|---|
arrayUnfiltered constraints
arrayFiltered constraintsgetDataForResults(array $ids, array $viewingUser, array $resultsGrouped) : array
If any of the given IDs are not returned from this, they will be removed from the results.
| see | \XenForo_Search_DataHandler_Abstract::getDataForResults() |
|---|
arrayList of IDs of this content type.
arrayInformation about the viewing user (keys: user_id, permission_combination_id, permissions)
arrayList of all results grouped by content type
arrayFormat: [id] => data, IDs not returned will be removed from resultsgetGroupByType() : string
| see | \XenForo_Search_DataHandler_Abstract::getGroupByType() |
|---|
stringIf empty, grouping will not be possiblegetJoinStructures(array $tables) : array
| see | \XenForo_Search_DataHandler_Abstract::getJoinStructures() |
|---|
arrayList of table aliases (in the keys) that are requested for this search
arrayKeys should be table aliases (to use in query). Values are arrays with keys:
* table - actual table name
* key - name of the field in the table that matches up with the relationship field
* relationship - field to join against. Array, 0 = table of field, 1 = field name.getOrderClause(string $order) : false | array
| see | \XenForo_Search_DataHandler_Abstract::getOrderClause() |
|---|
stringOrder requested by user
falsearrayFalse or or array of arrays. Child array keys: 0 = table alias, 1 = field, 2 = dir (asc/desc)getResultDate(array $result) : integer
getSearchContentTypes() : array
This may be multiple types (for example, thread and post for post searches).
| see | \XenForo_Search_DataHandler_Abstract::getSearchContentTypes() |
|---|
arraygetSearchFormControllerResponse(\XenForo_ControllerPublic_Abstract $controller, \XenForo_Input $input, array $viewParams) : \XenForo_ControllerResponse_Abstract | false
| see | \XenForo_Search_DataHandler_Abstract::getSearchFormControllerResponse() |
|---|
arrayView params prepared for general search
getTypeConstraintsFromInput(\XenForo_Input $input) : array
insertIntoIndex(\XenForo_Search_Indexer $indexer, array $data, array $parentData)
Wrapper around _insertIntoIndex().
| inherited_from | \XenForo_Search_DataHandler_Abstract::insertIntoIndex() |
|---|
arrayData that needs to be updated
arraynullData about the parent info (eg, for a post, the parent thread)
prepareResult(array $result, array $viewingUser) : array
| see | \XenForo_Search_DataHandler_Abstract::prepareResult() |
|---|
array
arrayInformation about the viewing user (keys: user_id, permission_combination_id, permissions)
arrayPrepared resultprocessConstraint(\XenForo_Search_SourceHandler_Abstract $sourceHandler, string $constraint, mixed $constraintInfo, array $constraints) : array | false
If the constraint is unknown, it should simply be ignored.
| see | \XenForo_Search_DataHandler_Abstract::processConstraint() |
|---|
stringName of the constraint
mixedData for the constraint; may be an array or scalar
arrayList of all constraints specified
arrayfalseIf processed, return array with possible keys:
* metadata - metadata value; keys: 0 = name of metadata, 1 = scalar/array allowed value(s) for metadata
* query - constraint to limit via query; keys: 0 = table alias, 1 = field, 2 = operator, 3 = scalar/array allowed value(s). Multiple for "=" operator only.
Note that the metadata and query keys are assumed to be equivalent. Engines need only use one (depending on engine details).quickIndex(\XenForo_Search_Indexer $indexer, array $contentIds) : array
| see | \XenForo_Search_DataHandler_Abstract::quickIndex() |
|---|
\XenForo_Search_Indexer
array
arrayList of content IDs indexedrebuildIndex(\XenForo_Search_Indexer $indexer, integer $lastId, integer $batchSize) : integer | false
| see | \XenForo_Search_DataHandler_Abstract::rebuildIndex() |
|---|
integerThe last ID that was processed. Should continue with the IDs above this.
integerNumber of records to process at once
integerfalseThe last ID that was processed or false if none were processedrenderResult(\XenForo_View $view, array $result, array $search) : \XenForo_Template_Abstract | string
| see | \XenForo_Search_DataHandler_Abstract::renderResult() |
|---|
\XenForo_View
arrayData from result
arrayThe search that was performed
updateIndex(\XenForo_Search_Indexer $indexer, array $data, array $fieldUpdates)
Wrapper around _updateIndex().
| inherited_from | \XenForo_Search_DataHandler_Abstract::updateIndex() |
|---|
arrayData that needs to be updated
arrayKey-value fields to update
_deleteFromIndex(\XenForo_Search_Indexer $indexer, array $dataList)
Wrapper around _deleteFromIndex().
| see | \XenForo_Search_DataHandler_Abstract::_deleteFromIndex() |
|---|
arrayA list of data to remove. Each element is an array of the data from one record or an ID.
_insertIntoIndex(\XenForo_Search_Indexer $indexer, array $data, array $parentData)
| see | \XenForo_Search_DataHandler_Abstract::_insertIntoIndex() |
|---|
arrayData that needs to be updated
arraynullData about the parent info (eg, for a post, the parent thread)
_updateIndex(\XenForo_Search_Indexer $indexer, array $data, array $fieldUpdates)
| see | \XenForo_Search_DataHandler_Abstract::_updateIndex() |
|---|
arrayData that needs to be updated
arrayKey-value fields to update
$_postModel : \XenForo_Model_Post
$_threadModel : \XenForo_Model_Thread