[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
MySQL search engine Copyright (C) 2004 Brion Vibber <[email protected]> https://www.mediawiki.org/
File Size: | 458 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
SearchMySQL:: (20 methods):
parseQuery()
regexTerm()
legalSearchChars()
searchText()
searchTitle()
searchInternal()
supports()
queryFeatures()
queryNamespaces()
limitResult()
getQuery()
getIndexField()
queryMain()
getCountQuery()
update()
updateTitle()
delete()
normalizeText()
stripForSearchCallback()
minSearchLength()
Class: SearchMySQL - X-Ref
Search engine hook for MySQL 4+parseQuery( $filteredText, $fulltext ) X-Ref |
Parse the user's query and transform it into an SQL fragment which will become part of a WHERE clause param: string $filteredText param: string $fulltext return: string |
regexTerm( $string, $wildcard ) X-Ref |
No description |
legalSearchChars() X-Ref |
No description |
searchText( $term ) X-Ref |
Perform a full text search query and return a result set. param: string $term Raw search term return: SqlSearchResultSet |
searchTitle( $term ) X-Ref |
Perform a title-only search query and return a result set. param: string $term Raw search term return: SqlSearchResultSet |
searchInternal( $term, $fulltext ) X-Ref |
No description |
supports( $feature ) X-Ref |
No description |
queryFeatures( &$query ) X-Ref |
Add special conditions param: array $query |
queryNamespaces( &$query ) X-Ref |
Add namespace conditions param: array $query |
limitResult( &$query ) X-Ref |
Add limit options param: array $query |
getQuery( $filteredTerm, $fulltext ) X-Ref |
Construct the SQL query to do the search. The guts shoulds be constructed in queryMain() param: string $filteredTerm param: bool $fulltext return: array |
getIndexField( $fulltext ) X-Ref |
Picks which field to index on, depending on what type of query. param: bool $fulltext return: string |
queryMain( &$query, $filteredTerm, $fulltext ) X-Ref |
Get the base part of the search query. param: array &$query Search query array param: string $filteredTerm param: bool $fulltext |
getCountQuery( $filteredTerm, $fulltext ) X-Ref |
param: string $filteredTerm param: bool $fulltext return: array |
update( $id, $title, $text ) X-Ref |
Create or update the search index record for the given page. Title and text should be pre-processed. param: int $id param: string $title param: string $text |
updateTitle( $id, $title ) X-Ref |
Update a search index record's title only. Title should be pre-processed. param: int $id param: string $title |
delete( $id, $title ) X-Ref |
Delete an indexed page Title should be pre-processed. param: int $id Page id that was deleted param: string $title Title of page that was deleted |
normalizeText( $string ) X-Ref |
Converts some characters for MySQL's indexing to grok it correctly, and pads short words to overcome limitations. param: string $string return: mixed|string |
stripForSearchCallback( $matches ) X-Ref |
Armor a case-folded UTF-8 string to get through MySQL's fulltext search without being mucked up by funny charset settings or anything else of the sort. param: array $matches return: string |
minSearchLength() X-Ref |
Check MySQL server's ft_min_word_len setting so we know if we need to pad short words... return: int |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |