MediaWiki  REL1_19
SearchMssql Class Reference

Search engine hook base class for Mssql (ConText). More...

Inheritance diagram for SearchMssql:
Collaboration diagram for SearchMssql:

List of all members.

Public Member Functions

 __construct ($db)
 Creates an instance of this class.
 getIndexField ($fulltext)
 Picks which field to index on, depending on what type of query.
 getQuery ($filteredTerm, $fulltext)
 Construct the full SQL query to do the search.
 parseQuery ($filteredText, $fulltext)
 queryLimit ($sql)
 Return a LIMIT clause to limit results on the query.
 queryMain ($filteredTerm, $fulltext)
 Get the base part of the search query.
 queryNamespaces ()
 Return a partial WHERE clause to limit the search to the given namespaces.
 queryRanking ($filteredTerm, $fulltext)
 Does not do anything for generic search engine subclasses may define this though.
 queryRedirect ()
 Return a partial WHERE clause to exclude redirects, if so set.
 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.
 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 Mssql (ConText).

Definition at line 28 of file SearchMssql.php.


Constructor & Destructor Documentation

Creates an instance of this class.

Parameters:
$dbDatabaseMssql: database object

Reimplemented from SearchEngine.

Definition at line 34 of file SearchMssql.php.

References SearchEngine\$db.


Member Function Documentation

SearchMssql::getIndexField ( fulltext)

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

Parameters:
$fulltextBoolean
Returns:
string

Definition at line 132 of file SearchMssql.php.

Referenced by parseQuery().

Here is the caller graph for this function:

SearchMssql::getQuery ( filteredTerm,
fulltext 
)

Construct the full SQL query to do the search.

The guts shoulds be constructed in queryMain()

Parameters:
$filteredTermString
$fulltextBoolean

Definition at line 119 of file SearchMssql.php.

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

Here is the call graph for this function:

SearchMssql::parseQuery ( filteredText,
fulltext 
)
Todo:
document

Definition at line 155 of file SearchMssql.php.

References $wgContLang, getIndexField(), and SearchEngine\legalSearchChars().

Referenced by queryMain().

Here is the call graph for this function:

Here is the caller graph for this function:

Return a LIMIT clause to limit results on the query.

Parameters:
$sqlstring
Returns:
String

Definition at line 98 of file SearchMssql.php.

Referenced by getQuery().

Here is the caller graph for this function:

SearchMssql::queryMain ( filteredTerm,
fulltext 
)

Get the base part of the search query.

Parameters:
$filteredTermString
$fulltextBoolean
Returns:
String
Access:
private

Definition at line 144 of file SearchMssql.php.

References $page, and parseQuery().

Referenced by getQuery().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Returns:
String
Access:
private

Definition at line 83 of file SearchMssql.php.

References SearchEngine\$namespaces.

Referenced by getQuery().

Here is the caller graph for this function:

SearchMssql::queryRanking ( filteredTerm,
fulltext 
)

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

Returns:
String

Definition at line 108 of file SearchMssql.php.

Referenced by getQuery().

Here is the caller graph for this function:

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

Returns:
String
Access:
private

Definition at line 69 of file SearchMssql.php.

Referenced by getQuery().

Here is the caller graph for this function:

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

Parameters:
$termString: raw search term
Returns:
MssqlSearchResultSet
Access:
public

Reimplemented from SearchEngine.

Definition at line 45 of file SearchMssql.php.

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

Parameters:
$termString: raw search term
Returns:
MssqlSearchResultSet
Access:
public

Reimplemented from SearchEngine.

Definition at line 57 of file SearchMssql.php.

References false.

SearchMssql::update ( id,
title,
text 
)

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

Title and text should be pre-processed.

Parameters:
$idInteger
$titleString
$textString

Reimplemented from SearchEngine.

Definition at line 193 of file SearchMssql.php.

References $title.

SearchMssql::updateTitle ( id,
title 
)

Update a search index record's title only.

Title should be pre-processed.

Parameters:
$idInteger
$titleString

Reimplemented from SearchEngine.

Definition at line 215 of file SearchMssql.php.

References $title.


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