vBulletin 5.6.5 API

vB_Search_Core
in package
Uses vB_Trait_NoSerialize

Table of Contents

OP_COMPLEX  = 'complex'
OP_EQ  = 'eq'
OP_GTE  = 'gte'
OP_LTE  = 'lte'
OP_NEQ  = 'neq'
TYPE_COMMON  = 'common'
__serialize()  : mixed
__sleep()  : mixed
__unserialize()  : mixed
__wakeup()  : mixed
attributeChanged()  : mixed
this function should be called whenever an attribute changes in the node table
cacheResults()  : mixed
Caches the results
clean()  : mixed
delete()  : mixed
emptyIndex()  : mixed
floodCheck()  : mixed
getCache()  : mixed
getFromCache()  : mixed
getResults()  : mixed
getTwoPassResults()  : mixed
index()  : mixed
Index a node
indexBatch()  : mixed
Index a list of nodes
indexText()  : mixed
Index a node
indexTextBatch()  : mixed
Index a batch of nodes
indexTrending()  : mixed
instance()  : mixed
normalizeIgnoreListForSearchHash()  : mixed
purgeCacheForUser()  : mixed
reIndexAll()  : mixed
removeNodeFromResult()  : mixed
saveSecondPassResults()  : mixed
generateHash()  : mixed
getNodeToIndex()  : mixed
getParentNodeId()  : mixed
getTitleAndText()  : mixed
indexChildAttachment()  : mixed
getTwoPassCacheKey()  : string
Generate a cache key for the first pass of getSearchResults. Build key based on: usergroupids, infractiongroupids, search json, search sort order, search sort by, moderated channels

Constants

OP_COMPLEX

public mixed OP_COMPLEX = 'complex'

OP_EQ

public mixed OP_EQ = 'eq'

OP_GTE

public mixed OP_GTE = 'gte'

OP_LTE

public mixed OP_LTE = 'lte'

OP_NEQ

public mixed OP_NEQ = 'neq'

TYPE_COMMON

public mixed TYPE_COMMON = 'common'

Methods

__serialize()

public __serialize() : mixed
Return values
mixed

__sleep()

public __sleep() : mixed
Return values
mixed

__unserialize()

public __unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed
Return values
mixed

__wakeup()

public __wakeup() : mixed
Return values
mixed

attributeChanged()

this function should be called whenever an attribute changes in the node table

public attributeChanged(int|array<string|int, mixed> $nodeid) : mixed
Parameters
$nodeid : int|array<string|int, mixed>
Return values
mixed

cacheResults()

Caches the results

public cacheResults(array<string|int, mixed> $nodeIds, vB_Search_Criteria $criteria, int $searchtime, mixed $searchType) : mixed
Parameters
$nodeIds : array<string|int, mixed>

Nodeids resulting from a successful search

$criteria : vB_Search_Criteria

Search criteria object

$searchtime : int

Elapsed search time in seconds

$searchType : mixed
Return values
mixed

array of strings and integers- see details below.

clean()

public clean() : mixed
Return values
mixed

delete()

public abstract delete(mixed $nodeid[, mixed $node = false ]) : mixed
Parameters
$nodeid : mixed
$node : mixed = false
Return values
mixed

emptyIndex()

public emptyIndex() : mixed
Return values
mixed

floodCheck()

public floodCheck() : mixed
Return values
mixed

getCache()

public getCache(mixed $resultId) : mixed
Parameters
$resultId : mixed
Return values
mixed

getFromCache()

public getFromCache(vB_Search_Criteria $criteria, mixed $search_json) : mixed
Parameters
$criteria : vB_Search_Criteria
$search_json : mixed
Return values
mixed

getResults()

public abstract getResults(vB_Search_Criteria $criteria) : mixed
Parameters
$criteria : vB_Search_Criteria
Return values
mixed

getTwoPassResults()

public getTwoPassResults(vB_Search_Criteria $criteria) : mixed
Parameters
$criteria : vB_Search_Criteria
Return values
mixed

index()

Index a node

public index(int|array<string|int, mixed> $node_id[, bool $propagate = true ]) : mixed
Parameters
$node_id : int|array<string|int, mixed>

-- id or node record to index.

$propagate : bool = true

flag to propagate the indexing to the nodes parents

Return values
mixed

indexBatch()

Index a list of nodes

public indexBatch(array<string|int, mixed> $nodes[, bool $forceupdate = false ]) : mixed

Note that this function does not handle propogation for other affected nodes. It assumes that those nodes are either currenctly correct or will be handled as part of a larger reindex operation.

Parameters
$nodes : array<string|int, mixed>

-- array of node records indexed by nodeid

$forceupdate : bool = false

-- if true we skip the CRC check on the node and update the word index anyway.

Return values
mixed

indexText()

Index a node

public abstract indexText(array<string|int, mixed> $node, string $title, string $text[, bool $forceupdate = false ]) : mixed
Parameters
$node : array<string|int, mixed>
$title : string

-- title text to index

$text : string

-- content text to index

$forceupdate : bool = false

-- if true we skip the CRC check on the node and update the word index anyway.

Return values
mixed

indexTextBatch()

Index a batch of nodes

public abstract indexTextBatch(array<string|int, mixed> $nodes, array<string|int, mixed> $titles, array<string|int, mixed> $texts[, bool $forceupdate = false ]) : mixed
Parameters
$nodes : array<string|int, mixed>

-- array of node arrays (indexed as $nodedid => $node)

$titles : array<string|int, mixed>

-- array of strings of the title text to index (indexed as $nodedid => $title)

$texts : array<string|int, mixed>

-- array of strings of thecontent text to index (indexed as $nodedid => $texts)

$forceupdate : bool = false

-- if true we skip the CRC check on the node and update the word index anyway.

Return values
mixed

indexTrending()

public abstract indexTrending(mixed $lookback, mixed $minimum) : mixed
Parameters
$lookback : mixed
$minimum : mixed
Return values
mixed

instance()

public static instance() : mixed
Return values
mixed

normalizeIgnoreListForSearchHash()

public static normalizeIgnoreListForSearchHash(mixed $ignorelist) : mixed
Parameters
$ignorelist : mixed
Return values
mixed

purgeCacheForUser()

public purgeCacheForUser(mixed $userid[, mixed $from = false ]) : mixed
Parameters
$userid : mixed
$from : mixed = false
Return values
mixed

reIndexAll()

public abstract reIndexAll() : mixed
Return values
mixed

removeNodeFromResult()

public removeNodeFromResult(mixed $nodeid, mixed $result, mixed $perpage, mixed $pagenumber, mixed $getStarterInfo) : mixed
Parameters
$nodeid : mixed
$result : mixed
$perpage : mixed
$pagenumber : mixed
$getStarterInfo : mixed
Return values
mixed

saveSecondPassResults()

public static saveSecondPassResults(mixed $nodeids, mixed $cacheKey[, mixed $parentid = false ]) : mixed
Parameters
$nodeids : mixed
$cacheKey : mixed
$parentid : mixed = false
Return values
mixed

generateHash()

protected generateHash(mixed $json) : mixed
Parameters
$json : mixed
Return values
mixed

getNodeToIndex()

protected getNodeToIndex(mixed $node) : mixed
Parameters
$node : mixed
Return values
mixed

getParentNodeId()

protected getParentNodeId(mixed $nodeid) : mixed
Parameters
$nodeid : mixed
Return values
mixed

getTitleAndText()

protected getTitleAndText(mixed $node[, mixed $propagate = true ]) : mixed
Parameters
$node : mixed
$propagate : mixed = true
Return values
mixed

indexChildAttachment()

protected indexChildAttachment(mixed $node_id, mixed $parentTitle, mixed $parentText) : mixed
Parameters
$node_id : mixed
$parentTitle : mixed
$parentText : mixed
Return values
mixed

getTwoPassCacheKey()

Generate a cache key for the first pass of getSearchResults. Build key based on: usergroupids, infractiongroupids, search json, search sort order, search sort by, moderated channels

private static getTwoPassCacheKey(vB_Search_Criteria $criteria) : string
Parameters
$criteria : vB_Search_Criteria
Tags
staticvar

array $hashResult Array to build hash from

Return values
string

Search results