[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/search/engine/ -> PhabricatorSearchEngine.php (source)

   1  <?php
   2  
   3  
   4  /**
   5   * Base class for Phabricator search engine providers. Each engine must offer
   6   * three capabilities: indexing, searching, and reconstruction (this can be
   7   * stubbed out if an engine can't reasonably do it, it is used for debugging).
   8   */
   9  abstract class PhabricatorSearchEngine {
  10  
  11    /**
  12     * Update the index for an abstract document.
  13     *
  14     * @param PhabricatorSearchAbstractDocument Document to update.
  15     * @return void
  16     */
  17    abstract public function reindexAbstractDocument(
  18      PhabricatorSearchAbstractDocument $document);
  19  
  20  
  21    /**
  22     * Reconstruct the document for a given PHID. This is used for debugging
  23     * and does not need to be perfect if it is unreasonable to implement it.
  24     *
  25     * @param  phid Document PHID to reconstruct.
  26     * @return PhabricatorSearchAbstractDocument Abstract document.
  27     */
  28    abstract public function reconstructDocument($phid);
  29  
  30  
  31    /**
  32     * Execute a search query.
  33     *
  34     * @param PhabricatorSavedQuery A query to execute.
  35     * @return list A list of matching PHIDs.
  36     */
  37    abstract public function executeSearch(PhabricatorSavedQuery $query);
  38  
  39  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1