* @subpackage Search
*/
-require_once( 'SearchEngine.php' );
+require_once( 'SearchMySQL.php' );
-class SearchMySQL4 extends SearchEngine {
- var $strictMatching = false;
+/**
+ * @package MediaWiki
+ * @subpackage Search
+ */
+class SearchMySQL4 extends SearchMySQL {
+ var $strictMatching = true;
+ /** @todo document */
function SearchMySQL4( &$db ) {
$this->db =& $db;
}
-
- function getIndexField( $fulltext ) {
- return $fulltext ? 'si_text' : 'si_title';
- }
+ /** @todo document */
function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
$lc = SearchEngine::legalSearchChars();
$field = $this->getIndexField( $fulltext );
return " MATCH($field) AGAINST('$searchon' IN BOOLEAN MODE) ";
}
-
- function queryMain( $filteredTerm, $fulltext ) {
- $match = $this->parseQuery( $filteredTerm, $fulltext );
- $cur = $this->db->tableName( 'cur' );
- $searchindex = $this->db->tableName( 'searchindex' );
- return 'SELECT cur_id, cur_namespace, cur_title, cur_text ' .
- "FROM $cur,$searchindex " .
- 'WHERE cur_id=si_page AND ' . $match;
- }
}
-
-?>
\ No newline at end of file
+?>