/**
* Search engine hook base class for MySQL.
* Specific bits for MySQL 3 and 4 variants are in child classes.
- * @package MediaWiki
- * @subpackage Search
+ * @addtogroup Search
*/
-
-/** */
-require_once( 'SearchEngine.php' );
-
-/** @package MediaWiki */
class SearchMySQL extends SearchEngine {
/**
* Perform a full text search query and return a result set.
/**
* Return a partial WHERE clause to exclude redirects, if so set
* @return string
- * @access private
+ * @private
*/
function queryRedirect() {
if( $this->showRedirects ) {
/**
* Return a partial WHERE clause to limit the search to the given namespaces
* @return string
- * @access private
+ * @private
*/
function queryNamespaces() {
$namespaces = implode( ',', $this->namespaces );
/**
* Return a LIMIT clause to limit results on the query.
* @return string
- * @access private
+ * @private
*/
function queryLimit() {
return $this->db->limitResult( '', $this->limit, $this->offset );
* Does not do anything for generic search engine
* subclasses may define this though
* @return string
- * @access private
+ * @private
*/
function queryRanking( $filteredTerm, $fulltext ) {
return '';
* The guts shoulds be constructed in queryMain()
* @param string $filteredTerm
* @param bool $fulltext
- * @access private
+ * @private
*/
function getQuery( $filteredTerm, $fulltext ) {
return $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
* @param string $filteredTerm
* @param bool $fulltext
* @return string
- * @access private
+ * @private
*/
function queryMain( $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
* @param string $text
*/
function update( $id, $title, $text ) {
- $dbw=& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$dbw->replace( 'searchindex',
array( 'si_page' ),
array(
* @param string $title
*/
function updateTitle( $id, $title ) {
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$dbw->update( 'searchindex',
array( 'si_title' => $title ),
}
}
-/** @package MediaWiki */
+/**
+ * @addtogroup Search
+ */
class MySQLSearchResultSet extends SearchResultSet {
function MySQLSearchResultSet( $resultSet, $terms ) {
$this->mResultSet = $resultSet;
return new SearchResult( $row );
}
}
+
+ function free() {
+ $this->mResultSet->free();
+ }
}
-?>
+