canViewResult()
create()
deleteFromIndex()
filterConstraints()
getDataForResults()
getGroupByType()
getJoinStructures()
getOrderClause()
getResultDate()
getSearchContentTypes()
getSearchFormControllerResponse()
getTypeConstraintsFromInput()
insertIntoIndex()
prepareResult()
processConstraint()
quickIndex()
rebuildIndex()
renderResult()
updateIndex()
_deleteFromIndex()
_getThreadModel()
_insertIntoIndex()
_updateIndex()
$_threadModel
Handles searching of threads.
package | XenForo_Search |
---|
canViewResult(array $result, array $viewingUser) : boolean
The user and combination ID will be the same as given to getDataForResults().
see | \global\XenForo_Search_DataHandler_Abstract::canViewResult() |
---|
array
Data for a result
array
Information about the viewing user (keys: user_id, permission_combination_id, permissions)
boolean
create(string $class) : \XenForo_Search_DataHandler_Abstract
inherited_from | \XenForo_Search_DataHandler_Abstract::create() |
---|
string
Object to create
deleteFromIndex(\XenForo_Search_Indexer $indexer, array $dataList)
Wrapper around _deleteFromIndex().
inherited_from | \XenForo_Search_DataHandler_Abstract::deleteFromIndex() |
---|
array
A 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() |
---|
array
Unfiltered constraints
array
Filtered 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 | \global\XenForo_Search_DataHandler_Abstract::getDataForResults() |
---|
array
List of IDs of this content type.
array
Information about the viewing user (keys: user_id, permission_combination_id, permissions)
array
List of all results grouped by content type
array
Format: [id] => data, IDs not returned will be removed from resultsgetGroupByType() : string
inherited_from | \XenForo_Search_DataHandler_Abstract::getGroupByType() |
---|
string
If empty, grouping will not be possiblegetJoinStructures(array $tables) : array
inherited_from | \XenForo_Search_DataHandler_Abstract::getJoinStructures() |
---|
array
List of table aliases (in the keys) that are requested for this search
array
Keys 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
inherited_from | \XenForo_Search_DataHandler_Abstract::getOrderClause() |
---|
string
Order requested by user
false
array
False or or array of arrays. Child array keys: 0 = table alias, 1 = field, 2 = dir (asc/desc)getResultDate(array $result) : integer
see | \global\XenForo_Search_DataHandler_Abstract::getResultDate() |
---|
array
integer
getSearchContentTypes() : array
This may be multiple types (for example, thread and post for post searches).
array
getSearchFormControllerResponse(\XenForo_ControllerPublic_Abstract $controller, \XenForo_Input $input, array $viewParams) : \XenForo_ControllerResponse_Abstract | false
inherited_from | \XenForo_Search_DataHandler_Abstract::getSearchFormControllerResponse() |
---|
array
View params prepared for general search
getTypeConstraintsFromInput(\XenForo_Input $input) : array
inherited_from | \XenForo_Search_DataHandler_Abstract::getTypeConstraintsFromInput() |
---|
\XenForo_Input
array
insertIntoIndex(\XenForo_Search_Indexer $indexer, array $data, array $parentData)
Wrapper around _insertIntoIndex().
inherited_from | \XenForo_Search_DataHandler_Abstract::insertIntoIndex() |
---|
array
Data that needs to be updated
array
null
Data about the parent info (eg, for a post, the parent thread)
prepareResult(array $result, array $viewingUser) : array
see | \global\XenForo_Search_DataHandler_Abstract::prepareResult() |
---|
array
array
Information about the viewing user (keys: user_id, permission_combination_id, permissions)
array
Prepared resultprocessConstraint(\XenForo_Search_SourceHandler_Abstract $sourceHandler, string $constraint, mixed $constraintInfo, array $constraints) : array | false
If the constraint is unknown, it should simply be ignored.
inherited_from | \XenForo_Search_DataHandler_Abstract::processConstraint() |
---|
string
Name of the constraint
mixed
Data for the constraint; may be an array or scalar
array
List of all constraints specified
array
false
If 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 | \global\XenForo_Search_DataHandler_Abstract::quickIndex() |
---|
\XenForo_Search_Indexer
array
array
List of content IDs indexedrebuildIndex(\XenForo_Search_Indexer $indexer, integer $lastId, integer $batchSize) : integer | false
see | \global\XenForo_Search_DataHandler_Abstract::rebuildIndex() |
---|
integer
The last ID that was processed. Should continue with the IDs above this.
integer
Number of records to process at once
integer
false
The last ID that was processed or false if none were processedrenderResult(\XenForo_View $view, array $result, array $search) : \XenForo_Template_Abstract | string
see | \global\XenForo_Search_DataHandler_Abstract::renderResult() |
---|
\XenForo_View
array
Data from result
array
The search that was performed
updateIndex(\XenForo_Search_Indexer $indexer, array $data, array $fieldUpdates)
Wrapper around _updateIndex().
inherited_from | \XenForo_Search_DataHandler_Abstract::updateIndex() |
---|
array
Data that needs to be updated
array
Key-value fields to update
_deleteFromIndex(\XenForo_Search_Indexer $indexer, array $dataList)
Wrapper around _deleteFromIndex().
see | \global\XenForo_Search_DataHandler_Abstract::_deleteFromIndex() |
---|
array
A 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 | \global\XenForo_Search_DataHandler_Abstract::_insertIntoIndex() |
---|
array
Data that needs to be updated
array
null
Data about the parent info (eg, for a post, the parent thread)
_updateIndex(\XenForo_Search_Indexer $indexer, array $data, array $fieldUpdates)
see | \global\XenForo_Search_DataHandler_Abstract::_updateIndex() |
---|
array
Data that needs to be updated
array
Key-value fields to update