SearchPostgres Class Reference
[Search]

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

Inherits SearchEngine.

List of all members.

Public Member Functions

 __construct ($db)
 searchTitle ($term)
 Perform a full text search query via tsearch2 and return a result set.
 searchText ($term)
 Perform a full text search query and return a result set.
 parseQuery ($term)
 searchQuery ($term, $fulltext, $colname)
 Construct the full SQL query to do the search.
 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 29 of file SearchPostgres.php.


Constructor & Destructor Documentation

SearchPostgres::__construct ( db  ) 

Definition at line 31 of file SearchPostgres.php.

References $db.


Member Function Documentation

SearchPostgres::parseQuery ( term  ) 

Definition at line 71 of file SearchPostgres.php.

References wfDebug().

Referenced by searchQuery().

SearchPostgres::searchQuery ( term,
fulltext,
colname 
)

Construct the full SQL query to do the search.

Parameters:
string $filteredTerm
string $fulltext
Access:
private

Definition at line 137 of file SearchPostgres.php.

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

Referenced by searchText(), and searchTitle().

SearchPostgres::searchText ( term  ) 

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

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

Parameters:
string $term - Raw search term
Returns:
SearchResultSet
Access:
public

Reimplemented from SearchEngine.

Definition at line 55 of file SearchPostgres.php.

References 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)

Parameters:
string $term - Raw search term
Returns:
PostgresSearchResultSet
Access:
public

Reimplemented from SearchEngine.

Definition at line 44 of file SearchPostgres.php.

References searchQuery().

SearchPostgres::update ( id,
title,
text 
)

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

Title and text should be pre-processed.

Parameters:
int $id
string $title
string $text

Reimplemented from SearchEngine.

Definition at line 204 of file SearchPostgres.php.

SearchPostgres::updateTitle ( id,
title 
)

Update a search index record's title only.

Title should be pre-processed.

Parameters:
int $id
string $title

Reimplemented from SearchEngine.

Definition at line 213 of file SearchPostgres.php.


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

Generated on Sat Sep 5 02:08:46 2009 for MediaWiki by  doxygen 1.5.9