MediaWiki  REL1_24
SearchPostgres Class Reference

Search engine hook base class for Postgres. More...

Inheritance diagram for SearchPostgres:
Collaboration diagram for SearchPostgres:

List of all members.

Public Member Functions

 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.

Detailed Description

Search engine hook base class for Postgres.

Definition at line 31 of file SearchPostgres.php.


Member Function Documentation

Transform the user's search string into a better form for tsearch2 Returns an SQL fragment consisting of quoted text to search for.

Parameters:
string$term
Returns:
string

Definition at line 64 of file SearchPostgres.php.

References $term, array(), as, and wfDebug().

Referenced by searchQuery().

SearchPostgres::searchQuery ( term,
fulltext,
colname 
)

Construct the full SQL query to do the search.

Parameters:
string$term
string$fulltext
string$colname
Returns:
string

Definition at line 131 of file SearchPostgres.php.

References SearchEngine\$namespaces, $query, $res, $term, are, array(), as, e, namespaces, parseQuery(), used, and wfDebug().

Referenced by searchText(), and searchTitle().

Perform a full text search query and return a result set.

If title searches are not supported or disabled, return null. STUB

Parameters:
string$termRaw search term
Returns:
SearchResultSet|Status|null

Reimplemented from SearchEngine.

Definition at line 48 of file SearchPostgres.php.

References $term, and searchQuery().

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)

Parameters:
string$termRaw search term
Returns:
SqlSearchResultSet

Reimplemented from SearchEngine.

Definition at line 40 of file SearchPostgres.php.

References $term, and searchQuery().

SearchPostgres::update ( id,
title,
text 
)

Create or update the search index record for the given page.

Title and text should be pre-processed. STUB

Parameters:
int$id
string$title
string$text

Reimplemented from SearchEngine.

Definition at line 186 of file SearchPostgres.php.

SearchPostgres::updateTitle ( id,
title 
)

Update a search index record's title only.

Title should be pre-processed. STUB

Parameters:
int$id
string$title

Reimplemented from SearchEngine.

Definition at line 195 of file SearchPostgres.php.


The documentation for this class was generated from the following file: