Inherits SearchEngine.
Inherited by SearchMySQL4.
Public Member Functions | |
| __construct ($db) | |
| parseQuery ($filteredText, $fulltext) | |
| Parse the user's query and transform it into an SQL fragment which will become part of a WHERE clause. | |
| 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 () | |
| 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. | |
| 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. | |
Static Public Member Functions | |
| static | legalSearchChars () |
Public Attributes | |
| $strictMatching = true | |
Definition at line 29 of file SearchMySQL.php.
| SearchMySQL::__construct | ( | $ | db | ) |
| SearchMySQL::getIndexField | ( | $ | fulltext | ) |
Picks which field to index on, depending on what type of query.
| bool | $fulltext |
Definition at line 180 of file SearchMySQL.php.
Referenced by parseQuery().
| SearchMySQL::getQuery | ( | $ | filteredTerm, | |
| $ | fulltext | |||
| ) |
Construct the full SQL query to do the search.
The guts shoulds be constructed in queryMain()
| string | $filteredTerm | |
| bool | $fulltext |
Definition at line 166 of file SearchMySQL.php.
References queryLimit(), queryMain(), queryNamespaces(), queryRanking(), and queryRedirect().
| static SearchMySQL::legalSearchChars | ( | ) | [static] |
Reimplemented from SearchEngine.
Definition at line 82 of file SearchMySQL.php.
Referenced by parseQuery().
| SearchMySQL::parseQuery | ( | $ | filteredText, | |
| $ | fulltext | |||
| ) |
Parse the user's query and transform it into an SQL fragment which will become part of a WHERE clause.
Definition at line 41 of file SearchMySQL.php.
References $wgContLang, getIndexField(), legalSearchChars(), and wfDebug().
Referenced by queryMain().
| SearchMySQL::queryLimit | ( | ) |
Return a LIMIT clause to limit results on the query.
Definition at line 145 of file SearchMySQL.php.
Referenced by getQuery().
| SearchMySQL::queryMain | ( | $ | filteredTerm, | |
| $ | fulltext | |||
| ) |
Get the base part of the search query.
The actual match syntax will depend on the server version; MySQL 3 and MySQL 4 have different capabilities in their fulltext search indexes.
| string | $filteredTerm | |
| bool | $fulltext |
Definition at line 195 of file SearchMySQL.php.
References $page, and parseQuery().
Referenced by getQuery().
| SearchMySQL::queryNamespaces | ( | ) |
Return a partial WHERE clause to limit the search to the given namespaces.
Definition at line 129 of file SearchMySQL.php.
References SearchEngine::$namespaces.
Referenced by getQuery().
| SearchMySQL::queryRanking | ( | $ | filteredTerm, | |
| $ | fulltext | |||
| ) |
Does not do anything for generic search engine subclasses may define this though.
Definition at line 155 of file SearchMySQL.php.
Referenced by getQuery().
| SearchMySQL::queryRedirect | ( | ) |
Return a partial WHERE clause to exclude redirects, if so set.
Definition at line 116 of file SearchMySQL.php.
Referenced by getQuery().
| SearchMySQL::searchText | ( | $ | term | ) |
Perform a full text search query and return a result set.
| string | $term - Raw search term |
Reimplemented from SearchEngine.
Definition at line 93 of file SearchMySQL.php.
| SearchMySQL::searchTitle | ( | $ | term | ) |
Perform a title-only search query and return a result set.
| string | $term - Raw search term |
Reimplemented from SearchEngine.
Definition at line 105 of file SearchMySQL.php.
| SearchMySQL::update | ( | $ | id, | |
| $ | title, | |||
| $ | text | |||
| ) |
Create or update the search index record for the given page.
Title and text should be pre-processed.
| int | $id | |
| string | $title | |
| string | $text |
Reimplemented from SearchEngine.
Definition at line 212 of file SearchMySQL.php.
| SearchMySQL::updateTitle | ( | $ | id, | |
| $ | title | |||
| ) |
Update a search index record's title only.
Title should be pre-processed.
| int | $id | |
| string | $title |
Reimplemented from SearchEngine.
Definition at line 230 of file SearchMySQL.php.
| SearchMySQL::$strictMatching = true |
Definition at line 30 of file SearchMySQL.php.
1.5.9