Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/engine/PhabricatorSearchEngine.php
Show All 30 Lines | abstract class PhabricatorSearchEngine { | ||||
/** | /** | ||||
* Execute a search query. | * Execute a search query. | ||||
* | * | ||||
* @param PhabricatorSavedQuery A query to execute. | * @param PhabricatorSavedQuery A query to execute. | ||||
* @return list A list of matching PHIDs. | * @return list A list of matching PHIDs. | ||||
*/ | */ | ||||
abstract public function executeSearch(PhabricatorSavedQuery $query); | abstract public function executeSearch(PhabricatorSavedQuery $query); | ||||
/** | |||||
* Does the search index exist? | |||||
* | |||||
* @return bool | |||||
*/ | |||||
abstract public function indexExists(); | |||||
/** | |||||
* Is the index in a usable state? | |||||
* | |||||
* @return bool | |||||
*/ | |||||
public function indexIsSane() { | |||||
return $this->indexExists(); | |||||
} | |||||
/** | |||||
* Do any sort of setup for the search index | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function initIndex() {} | |||||
} | } |