Inherits SearchEngine.
Public Member Functions | |
| __construct ($db) | |
| Creates an instance of this class. | |
| fulltextSearchSupported () | |
| Whether fulltext search is supported by current schema. | |
| parseQuery ($filteredText, $fulltext) | |
| Parse the user's query and transform it into an SQL fragment which will become part of a WHERE clause. | |
| regexTerm ($string, $wildcard) | |
| 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. | |
| limitResult ($sql) | |
| Returns a query with limit for number of results set. | |
| 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. | |
| getCountQuery ($filteredTerm, $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. | |
Static Public Member Functions | |
| static | legalSearchChars () |
Protected Member Functions | |
| searchInternal ($term, $fulltext) | |
Static Private Attributes | |
| static | $fulltextSupported = null |
Definition at line 28 of file SearchSqlite.php.
| SearchSqlite::__construct | ( | $ | db | ) |
Creates an instance of this class.
| $db | DatabaseSqlite: database object |
Definition at line 36 of file SearchSqlite.php.
| SearchSqlite::fulltextSearchSupported | ( | ) |
Whether fulltext search is supported by current schema.
Definition at line 44 of file SearchSqlite.php.
Referenced by searchInternal(), update(), and updateTitle().
| SearchSqlite::getCountQuery | ( | $ | filteredTerm, | |
| $ | fulltext | |||
| ) |
Definition at line 275 of file SearchSqlite.php.
References $page, parseQuery(), queryNamespaces(), and queryRedirect().
Referenced by searchInternal().
| SearchSqlite::getIndexField | ( | $ | fulltext | ) |
Picks which field to index on, depending on what type of query.
| $fulltext | Boolean |
Definition at line 255 of file SearchSqlite.php.
Referenced by parseQuery().
| SearchSqlite::getQuery | ( | $ | filteredTerm, | |
| $ | fulltext | |||
| ) |
Construct the full SQL query to do the search.
The guts shoulds be constructed in queryMain()
| $filteredTerm | String | |
| $fulltext | Boolean |
Definition at line 242 of file SearchSqlite.php.
References limitResult(), queryMain(), queryNamespaces(), and queryRedirect().
Referenced by searchInternal().
| static SearchSqlite::legalSearchChars | ( | ) | [static] |
Reimplemented from SearchEngine.
Definition at line 152 of file SearchSqlite.php.
Referenced by parseQuery().
| SearchSqlite::limitResult | ( | $ | sql | ) |
Returns a query with limit for number of results set.
| $sql | String: |
Definition at line 232 of file SearchSqlite.php.
Referenced by getQuery().
| SearchSqlite::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 59 of file SearchSqlite.php.
References $wgContLang, getIndexField(), legalSearchChars(), regexTerm(), and wfDebug().
Referenced by getCountQuery(), and queryMain().
| SearchSqlite::queryMain | ( | $ | filteredTerm, | |
| $ | fulltext | |||
| ) |
Get the base part of the search query.
| $filteredTerm | String | |
| $fulltext | Boolean |
Definition at line 266 of file SearchSqlite.php.
References $page, and parseQuery().
Referenced by getQuery().
| SearchSqlite::queryNamespaces | ( | ) |
Return a partial WHERE clause to limit the search to the given namespaces.
Definition at line 216 of file SearchSqlite.php.
References SearchEngine::$namespaces.
Referenced by getCountQuery(), and getQuery().
| SearchSqlite::queryRedirect | ( | ) |
Return a partial WHERE clause to exclude redirects, if so set.
Definition at line 204 of file SearchSqlite.php.
Referenced by getCountQuery(), and getQuery().
| SearchSqlite::regexTerm | ( | $ | string, | |
| $ | wildcard | |||
| ) |
Definition at line 133 of file SearchSqlite.php.
References $wgContLang.
Referenced by parseQuery().
| SearchSqlite::searchInternal | ( | $ | term, | |
| $ | fulltext | |||
| ) | [protected] |
Definition at line 176 of file SearchSqlite.php.
References $total, $wgContLang, $wgCountTotalSearchHits, SearchEngine::filter(), fulltextSearchSupported(), getCountQuery(), and getQuery().
Referenced by searchText(), and searchTitle().
| SearchSqlite::searchText | ( | $ | term | ) |
Perform a full text search query and return a result set.
| $term | String: raw search term |
Reimplemented from SearchEngine.
Definition at line 162 of file SearchSqlite.php.
References searchInternal().
| SearchSqlite::searchTitle | ( | $ | term | ) |
Perform a title-only search query and return a result set.
| $term | String: raw search term |
Reimplemented from SearchEngine.
Definition at line 172 of file SearchSqlite.php.
References searchInternal().
| SearchSqlite::update | ( | $ | id, | |
| $ | title, | |||
| $ | text | |||
| ) |
Create or update the search index record for the given page.
Title and text should be pre-processed.
| $id | Integer | |
| $title | String | |
| $text | String |
Reimplemented from SearchEngine.
Definition at line 294 of file SearchSqlite.php.
References $dbw, $title, fulltextSearchSupported(), and wfGetDB().
| SearchSqlite::updateTitle | ( | $ | id, | |
| $ | title | |||
| ) |
Update a search index record's title only.
Title should be pre-processed.
| $id | Integer | |
| $title | String |
Reimplemented from SearchEngine.
Definition at line 319 of file SearchSqlite.php.
References $dbw, $title, fulltextSearchSupported(), and wfGetDB().
SearchSqlite::$fulltextSupported = null [static, private] |
Definition at line 30 of file SearchSqlite.php.
1.5.9