MediaWiki
REL1_22
|
Search engine hook base class for Postgres. More...
Public Member Functions | |
__construct ($db) | |
Creates an instance of this class. | |
parseQuery ($term) | |
Transform the user's search string into a better form for tsearch2 Returns an SQL fragment consisting of quoted text to search for. | |
searchQuery ($term, $fulltext, $colname) | |
Construct the full SQL query to do the search. | |
searchText ($term) | |
Perform a full text search query and return a result set. | |
searchTitle ($term) | |
Perform a full text search query via tsearch2 and return a result set. | |
update ($pageid, $title, $text) | |
Create or update the search index record for the given page. | |
updateTitle ($id, $title) | |
Update a search index record's title only. | |
Protected Attributes | |
DatabasePostgres | $db |
Search engine hook base class for Postgres.
Definition at line 31 of file SearchPostgres.php.
SearchPostgres::__construct | ( | $ | db | ) |
Creates an instance of this class.
$db | DatabaseSqlite: database object |
Reimplemented from SearchEngine.
Definition at line 40 of file SearchPostgres.php.
SearchPostgres::parseQuery | ( | $ | term | ) |
Transform the user's search string into a better form for tsearch2 Returns an SQL fragment consisting of quoted text to search for.
$term | string |
Definition at line 83 of file SearchPostgres.php.
SearchPostgres::searchQuery | ( | $ | term, |
$ | fulltext, | ||
$ | colname | ||
) |
Construct the full SQL query to do the search.
$term | String |
$fulltext | String |
$colname |
Definition at line 150 of file SearchPostgres.php.
Referenced by searchText().
SearchPostgres::searchText | ( | $ | term | ) |
Perform a full text search query and return a result set.
If title searches are not supported or disabled, return null. STUB
string | $term | raw search term |
Reimplemented from SearchEngine.
Definition at line 64 of file SearchPostgres.php.
References $term, and searchQuery().
SearchPostgres::searchTitle | ( | $ | term | ) |
Perform a full text search query via tsearch2 and return a result set.
Currently searches a page's current title (page.page_title) and latest revision article text (pagecontent.old_text)
string | $term | raw search term |
Reimplemented from SearchEngine.
Definition at line 52 of file SearchPostgres.php.
SearchPostgres::update | ( | $ | id, |
$ | title, | ||
$ | text | ||
) |
Create or update the search index record for the given page.
Title and text should be pre-processed. STUB
$id | Integer |
$title | String |
$text | String |
Reimplemented from SearchEngine.
Definition at line 209 of file SearchPostgres.php.
SearchPostgres::updateTitle | ( | $ | id, |
$ | title | ||
) |
Update a search index record's title only.
Title should be pre-processed. STUB
$id | Integer |
$title | String |
Reimplemented from SearchEngine.
Definition at line 218 of file SearchPostgres.php.
DatabasePostgres SearchPostgres::$db [protected] |
Reimplemented from SearchEngine.
Definition at line 35 of file SearchPostgres.php.