Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F455834
PhabricatorSearchEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorSearchEngine.php
View Options
<?php
/**
* 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).
*/
abstract
class
PhabricatorSearchEngine
{
/**
* Update the index for an abstract document.
*
* @param PhabricatorSearchAbstractDocument Document to update.
* @return void
*/
abstract
public
function
reindexAbstractDocument
(
PhabricatorSearchAbstractDocument
$document
);
/**
* 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.
*
* @param phid Document PHID to reconstruct.
* @return PhabricatorSearchAbstractDocument Abstract document.
*/
abstract
public
function
reconstructDocument
(
$phid
);
/**
* Execute a search query.
*
* @param PhabricatorSavedQuery A query to execute.
* @return list A list of matching PHIDs.
*/
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
()
{}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 7:18 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70565
Default Alt Text
PhabricatorSearchEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment