MediaWiki
REL1_22
|
Search engine hook for SQLite. More...
Public Member Functions | |
__construct ($db) | |
Creates an instance of this class. | |
fulltextSearchSupported () | |
Whether fulltext search is supported by current schema. | |
getCountQuery ($filteredTerm, $fulltext) | |
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. | |
limitResult ($sql) | |
Returns a query with limit for number of results set. | |
parseQuery ($filteredText, $fulltext) | |
Parse the user's query and transform it into an SQL fragment which will become part of a WHERE clause. | |
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. | |
queryRedirect () | |
Return a partial WHERE clause to exclude redirects, if so set. | |
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. | |
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) | |
Protected Attributes | |
DatabaseSqlite | $db |
Search engine hook for SQLite.
Definition at line 28 of file SearchSqlite.php.
SearchSqlite::__construct | ( | $ | db | ) |
Creates an instance of this class.
$db | DatabaseSqlite: database object |
Reimplemented from SearchEngine.
Definition at line 38 of file SearchSqlite.php.
Whether fulltext search is supported by current schema.
Definition at line 46 of file SearchSqlite.php.
Referenced by searchInternal().
SearchSqlite::getCountQuery | ( | $ | filteredTerm, |
$ | fulltext | ||
) |
Definition at line 277 of file SearchSqlite.php.
References 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 257 of file SearchSqlite.php.
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 244 of file SearchSqlite.php.
Referenced by searchInternal().
static SearchSqlite::legalSearchChars | ( | ) | [static] |
Reimplemented from SearchEngine.
Definition at line 153 of file SearchSqlite.php.
SearchSqlite::limitResult | ( | $ | sql | ) |
Returns a query with limit for number of results set.
$sql | String: |
Definition at line 233 of file SearchSqlite.php.
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 56 of file SearchSqlite.php.
Referenced by getCountQuery().
SearchSqlite::queryMain | ( | $ | filteredTerm, |
$ | fulltext | ||
) |
Get the base part of the search query.
$filteredTerm | String |
$fulltext | Boolean |
Definition at line 268 of file SearchSqlite.php.
Return a partial WHERE clause to limit the search to the given namespaces.
Definition at line 216 of file SearchSqlite.php.
Referenced by getCountQuery().
Return a partial WHERE clause to exclude redirects, if so set.
Definition at line 204 of file SearchSqlite.php.
Referenced by getCountQuery().
SearchSqlite::regexTerm | ( | $ | string, |
$ | wildcard | ||
) |
Definition at line 134 of file SearchSqlite.php.
References $wgContLang, and global.
SearchSqlite::searchInternal | ( | $ | term, |
$ | fulltext | ||
) | [protected] |
Definition at line 177 of file SearchSqlite.php.
References $term, $total, $wgContLang, SearchEngine\filter(), fulltextSearchSupported(), getCountQuery(), getQuery(), and global.
SearchSqlite::searchText | ( | $ | term | ) |
Perform a full text search query and return a result set.
string | $term | raw search term |
Reimplemented from SearchEngine.
Definition at line 163 of file SearchSqlite.php.
SearchSqlite::searchTitle | ( | $ | term | ) |
Perform a title-only search query and return a result set.
string | $term | raw search term |
Reimplemented from SearchEngine.
Definition at line 173 of file SearchSqlite.php.
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 296 of file SearchSqlite.php.
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 321 of file SearchSqlite.php.
DatabaseSqlite SearchSqlite::$db [protected] |
Reimplemented from SearchEngine.
Definition at line 32 of file SearchSqlite.php.