SearchIBM_DB2 Class Reference
[Search]

Search engine hook base class for IBM DB2. More...

Inherits SearchEngine.

List of all members.

Public Member Functions

 __construct ($db)
 searchText ($term)
 Perform a full text search query and return a result set.
 searchTitle ($term)
 Perform a title-only search query and return a result set.
 queryRedirect ()
 Return a partial WHERE clause to exclude redirects, if so set.
 queryNamespaces ()
 Return a partial WHERE clause to limit the search to the given namespaces.
 queryLimit ($sql)
 Return a LIMIT clause to limit results on the query.
 queryRanking ($filteredTerm, $fulltext)
 Does not do anything for generic search engine subclasses may define this though.
 getQuery ($filteredTerm, $fulltext)
 Construct the full SQL query to do the search.
 getIndexField ($fulltext)
 Picks which field to index on, depending on what type of query.
 queryMain ($filteredTerm, $fulltext)
 Get the base part of the search query.
 parseQuery ($filteredText, $fulltext)
 update ($id, $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 IBM DB2.

Definition at line 29 of file SearchIBM_DB2.php.


Constructor & Destructor Documentation

SearchIBM_DB2::__construct ( db  ) 

Definition at line 30 of file SearchIBM_DB2.php.


Member Function Documentation

SearchIBM_DB2::getIndexField ( fulltext  ) 

Picks which field to index on, depending on what type of query.

Parameters:
$fulltext Boolean
Returns:
String

Definition at line 121 of file SearchIBM_DB2.php.

Referenced by parseQuery().

SearchIBM_DB2::getQuery ( filteredTerm,
fulltext 
)

Construct the full SQL query to do the search.

The guts shoulds be constructed in queryMain()

Parameters:
string $filteredTerm String
bool $fulltext Boolean

Definition at line 108 of file SearchIBM_DB2.php.

References queryLimit(), queryMain(), queryNamespaces(), queryRanking(), and queryRedirect().

SearchIBM_DB2::parseQuery ( filteredText,
fulltext 
)

Todo:
document

Definition at line 142 of file SearchIBM_DB2.php.

References $t, $wgContLang, getIndexField(), and SearchEngine::legalSearchChars().

Referenced by queryMain().

SearchIBM_DB2::queryLimit ( sql  ) 

Return a LIMIT clause to limit results on the query.

Returns:
String

Definition at line 87 of file SearchIBM_DB2.php.

Referenced by getQuery().

SearchIBM_DB2::queryMain ( filteredTerm,
fulltext 
)

Get the base part of the search query.

Parameters:
string $filteredTerm String
bool $fulltext Boolean
Returns:
String

Definition at line 132 of file SearchIBM_DB2.php.

References $page, and parseQuery().

Referenced by getQuery().

SearchIBM_DB2::queryNamespaces (  ) 

Return a partial WHERE clause to limit the search to the given namespaces.

Returns:
String

Definition at line 73 of file SearchIBM_DB2.php.

References SearchEngine::$namespaces.

Referenced by getQuery().

SearchIBM_DB2::queryRanking ( filteredTerm,
fulltext 
)

Does not do anything for generic search engine subclasses may define this though.

Returns:
String

Definition at line 96 of file SearchIBM_DB2.php.

Referenced by getQuery().

SearchIBM_DB2::queryRedirect (  ) 

Return a partial WHERE clause to exclude redirects, if so set.

Returns:
String

Definition at line 61 of file SearchIBM_DB2.php.

Referenced by getQuery().

SearchIBM_DB2::searchText ( term  ) 

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

Parameters:
$term String: raw search term
Returns:
SqlSearchResultSet

Reimplemented from SearchEngine.

Definition at line 40 of file SearchIBM_DB2.php.

SearchIBM_DB2::searchTitle ( term  ) 

Perform a title-only search query and return a result set.

Parameters:
$term String: taw search term
Returns:
SqlSearchResultSet

Reimplemented from SearchEngine.

Definition at line 51 of file SearchIBM_DB2.php.

SearchIBM_DB2::update ( id,
title,
text 
)

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

Title and text should be pre-processed.

Parameters:
$id Integer
$title String
$text String

Reimplemented from SearchEngine.

Definition at line 194 of file SearchIBM_DB2.php.

References $dbw, $title, and wfGetDB().

SearchIBM_DB2::updateTitle ( id,
title 
)

Update a search index record's title only.

Title should be pre-processed.

Parameters:
$id Integer
$title String

Reimplemented from SearchEngine.

Definition at line 215 of file SearchIBM_DB2.php.

References $dbw, $title, and wfGetDB().


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

Generated on Sat Apr 30 22:57:48 2011 for MediaWiki by  doxygen 1.5.9