Page MenuHomePhorge
Diviner Phabricator Tech Docs PhabricatorElasticFulltextStorageEngine

final class PhabricatorElasticFulltextStorageEngine
Phabricator Technical Documentation (Search)

This class is not documented.

Methods

public function getEngineIdentifier()

PhabricatorFulltextStorageEngine

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

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Return
stringUnique string for this engine, max length 32.

public function getEnginePriority()

PhabricatorFulltextStorageEngine

Prioritize this engine relative to other engines.

Engines with a smaller priority number get an opportunity to write files first. Generally, lower-latency filestores should have lower priority numbers, and higher-latency filestores should have higher priority numbers. Setting priority to approximately the number of milliseconds of read latency will generally produce reasonable results.

In conjunction with filesize limits, the goal is to store small files like profile images, thumbnails, and text snippets in lower-latency engines, and store large files in higher-capacity engines.

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Return
floatEngine priority.

public function isEnabled()

PhabricatorFulltextStorageEngine

Return true if the engine is currently writable.

Engines that are disabled or missing configuration should return false to prevent new writes. If writes were made with this engine in the past, the application may still try to perform reads.

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Return
boolTrue if this engine can support new writes.

public function reindexAbstractDocument($doc)

PhabricatorFulltextStorageEngine

Update the index for an abstract document.

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Parameters
PhabricatorSearchAbstractDocument$documentDocument to update.
Return
void

public function reconstructDocument($phid)

PhabricatorFulltextStorageEngine

Reconstruct the document for a given PHID. This is used for debugging and does not need to be perfect if it is unreasonable to implement it.

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Parameters
phid$phidDocument PHID to reconstruct.
Return
PhabricatorSearchAbstractDocumentAbstract document.

public function executeSearch($query)

PhabricatorFulltextStorageEngine

Execute a search query.

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Parameters
PhabricatorSavedQuery$queryA query to execute.
Return
listA list of matching PHIDs.

public function indexExists()

PhabricatorFulltextStorageEngine

Does the search index exist?

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Return
bool

public function indexIsSane()

PhabricatorFulltextStorageEngine

Is the index in a usable state?

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Return
bool

public function initIndex()

PhabricatorFulltextStorageEngine

Do any sort of setup for the search index.

PhabricatorElasticFulltextStorageEngine
This method is not documented.
Return
void

public static function loadAllEngines()
Inherited

This method is not documented.
Return
wild

public static function loadActiveEngines()
Inherited

This method is not documented.
Return
wild

public static function loadEngine()
Inherited

This method is not documented.
Return
wild

public function __construct()

This method is not documented.
Return
this//Implicit.//

public function setURI($uri)

This method is not documented.
Parameters
$uri
Return
wild

public function setIndex($index)

This method is not documented.
Parameters
$index
Return
wild

public function setTimeout($timeout)

This method is not documented.
Parameters
$timeout
Return
wild

public function getURI()

This method is not documented.
Return
wild

public function getIndex()

This method is not documented.
Return
wild

public function getTimeout()

This method is not documented.
Return
wild

private function buildSpec($query)

This method is not documented.
Parameters
PhabricatorSavedQuery$query
Return
wild

private function getIndexConfiguration()

This method is not documented.
Return
wild

private function check($actual, $required)

Recursively check if two Elasticsearch configuration arrays are equal

Parameters
$actual$actual
$required$requiredarray
Return
bool

private static function normalizeConfigValue($value)

Normalize a config value for comparison. Elasticsearch accepts all kinds of config values but it tends to throw back 'true' for true and 'false' for false so we normalize everything. Sometimes, oddly, it'll throw back false for false....

Parameters
mixed$valueconfig value
Return
mixedvalue normalized

private function executeRequest($path, $data, $method)

This method is not documented.
Parameters
$path
array$data
$method
Return
wild