Page MenuHomePhorge
Diviner Tech Docs PhabricatorFulltextStorageEngine

abstract class PhabricatorFulltextStorageEngine
Phorge Technical Documentation (Search)

Base class for Phabricator search engine providers. Each engine must offer three capabilities: indexing, searching, and reconstruction (this can be stubbed out if an engine can't reasonably do it, it is used for debugging).

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function getHosts()

This method is not documented.
Return
wild

public function setService($service)

This method is not documented.
Parameters
PhabricatorSearchService$service
Return
wild

public function getService()

This method is not documented.
Return
PhabricatorSearchService

abstract public function getHostType()

Implementations must return a prototype host instance which is cloned by the PhabricatorSearchService infrastructure to configure each engine.

Return
PhabricatorSearchHost

abstract public function getEngineIdentifier()

Return a unique, nonempty string which identifies this storage engine.

Return
stringUnique string for this engine, max length 32.

abstract public function reindexAbstractDocument($document)

Update the index for an abstract document.

Parameters
PhabricatorSearchAbstractDocument$documentDocument to update.
Return
void

abstract public function executeSearch($query)

Execute a search query.

Parameters
PhabricatorSavedQuery$queryA query to execute.
Return
listA list of matching PHIDs.

abstract public function indexExists()

Does the search index exist?

Return
bool

abstract public function getIndexStats()

Implementations should override this method to return a dictionary of stats which are suitable for display in the admin UI.

Return
wild

public function indexIsSane()

Is the index in a usable state?

Return
bool

public function initIndex()

Do any sort of setup for the search index.

Return
void

public function getFulltextTokens()

This method is not documented.
Return
wild