MediaWiki  REL1_19
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

 __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

 $db

Detailed Description

Search engine hook base class for Postgres.

Definition at line 31 of file SearchPostgres.php.


Constructor & Destructor Documentation

Creates an instance of this class.

Parameters:
$dbDatabaseSqlite: database object

Reimplemented from SearchEngine.

Definition at line 41 of file SearchPostgres.php.

References $db.


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:
$termstring
Returns:
string

Definition at line 84 of file SearchPostgres.php.

References wfDebug().

Referenced by searchQuery().

Here is the call graph for this function:

Here is the caller graph for this function:

SearchPostgres::searchQuery ( term,
fulltext,
colname 
)

Construct the full SQL query to do the search.

Parameters:
$termString
$fulltextString
$colname

Definition at line 150 of file SearchPostgres.php.

References SearchEngine\$namespaces, $res, parseQuery(), and wfDebug().

Referenced by searchText(), and searchTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Parameters:
$termString: raw search term
Returns:
SearchResultSet

Reimplemented from SearchEngine.

Definition at line 65 of file SearchPostgres.php.

References searchQuery().

Here is the call graph for this function:

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:
$termString: raw search term
Returns:
PostgresSearchResultSet

Reimplemented from SearchEngine.

Definition at line 53 of file SearchPostgres.php.

References searchQuery().

Here is the call graph for this function:

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:
$idInteger
$titleString
$textString

Reimplemented from SearchEngine.

Definition at line 208 of file SearchPostgres.php.

SearchPostgres::updateTitle ( id,
title 
)

Update a search index record's title only.

Title should be pre-processed. STUB

Parameters:
$idInteger
$titleString

Reimplemented from SearchEngine.

Definition at line 217 of file SearchPostgres.php.


Member Data Documentation

SearchPostgres::$db [protected]

Reimplemented from SearchEngine.

Definition at line 36 of file SearchPostgres.php.

Referenced by __construct().


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