vBulletin v6.0.4

vB_Library_Search extends vB_Library
in package

vB_Library_Search

Table of Contents

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
attributeChanged()  : mixed
clean()  : mixed
clearCache()  : mixed
convertToParentChannels()  : mixed
delete()  : mixed
emptyIndex()  : mixed
getContentInstance()  : mixed
getRangeFromNodeCount()  : int
Gets the nodes to index from a particular node
index()  : mixed
Index a node
indexNodeList()  : mixed
indexRangeFromNode()  : int|bool
Index a range of nodes based on the prior node
indexText()  : mixed
indexTrending()  : mixed
instance()  : static
Returns singleton instance of self.
monitorWords()  : mixed
Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
purgeCacheForCurrentUser()  : mixed
Purge search log cache for current logged-in user
reIndexAll()  : bool
Re-indexes the whole database Returns true if the full indexing is implemented and successful for the selected search implementation Returns false if the full indexing is not implemented

Methods

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

attributeChanged()

public attributeChanged(mixed $nodeid) : mixed
Parameters
$nodeid : mixed

clearCache()

public static clearCache() : mixed

convertToParentChannels()

public convertToParentChannels(mixed $filterType, mixed $filterChannels, mixed $includeChildren) : mixed
Parameters
$filterType : mixed
$filterChannels : mixed
$includeChildren : mixed

delete()

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

emptyIndex()

public emptyIndex() : mixed

getContentInstance()

public static getContentInstance(mixed $contenttypeid) : mixed
Parameters
$contenttypeid : mixed

getRangeFromNodeCount()

Gets the nodes to index from a particular node

public getRangeFromNodeCount(int $previousNodeId[, mixed $channelid = null ][, mixed $contenttype = null ]) : int

The companion of indexRangeFromNode, this get's the total number of nodes to count. The startNode is provided in case a partial index is intended. The expectation is that this is called once with the starting node and not for each batch. This will take some time on larger sites so should be avoided if time is an issue (it may cause the webserver to time out).

This is primarily hear to avoid duplicating logic affecting the count that might change.

Parameters
$previousNodeId : int

-- the node to start after. This is frequently the nodeid returned from the previous batch. Pass 0 to start from the beginning. Pass $nodid-1 to start at a particular node inclusive.

$channelid : mixed = null
$contenttype : mixed = null
Return values
int

-- the number of nodes to index

index()

Index a node

public index(int $node_id[, bool $propagate = true ]) : mixed
Parameters
$node_id : int

to index

$propagate : bool = true

flag to propagate the indexing to the nodes parents

indexNodeList()

public indexNodeList(mixed $nodeids) : mixed
Parameters
$nodeids : mixed

indexRangeFromNode()

Index a range of nodes based on the prior node

public indexRangeFromNode(int $previousNodeId, int $perpage[, mixed $channelid = null ][, mixed $contenttype = null ]) : int|bool

This is intended to page through a list of nodes to break up a reindex operation without using a (limitstart, limit) process that doesn't scale well to large node tables.

We skip channels and reports when doing the range.

Parameters
$previousNodeId : int

-- the node to start after. This is frequently the nodeid returned from the previous batch. Pass 0 to start from the beginning. Pass $nodid-1 to start at a particular node inclusive.

$perpage : int

-- the number of nodes to index per run. You can pass a false value to index the entire table in one go, but this isn't really a good idea on large sites.

$channelid : mixed = null
$contenttype : mixed = null
Return values
int|bool

-- returns the id of the last node indexed or false if there are no more nodes to index.

indexText()

public indexText(mixed $node, mixed $title, mixed $text) : mixed
Parameters
$node : mixed
$title : mixed
$text : mixed

indexTrending()

public indexTrending(mixed $lookback, mixed $minimum) : mixed
Parameters
$lookback : mixed
$minimum : mixed

instance()

Returns singleton instance of self.

public static instance(mixed $class) : static
Parameters
$class : mixed
Return values
static
  • Reference to singleton instance of the requested library class

monitorWords()

Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.

public monitorWords(mixed $text, mixed $type, mixed $nodeid[, mixed $userid = null ][, mixed $insertNotifications = true ][, mixed $currentuserid = 0 ]) : mixed
Parameters
$text : mixed
$type : mixed
$nodeid : mixed
$userid : mixed = null
$insertNotifications : mixed = true
$currentuserid : mixed = 0
Tags
deprecated

use the functions from the notification library directly.

purgeCacheForCurrentUser()

Purge search log cache for current logged-in user

public purgeCacheForCurrentUser([mixed $from = false ]) : mixed
Parameters
$from : mixed = false

reIndexAll()

Re-indexes the whole database Returns true if the full indexing is implemented and successful for the selected search implementation Returns false if the full indexing is not implemented

public reIndexAll([mixed $silent = false ]) : bool
Parameters
$silent : mixed = false
Return values
bool

        
On this page

Search results