* Perform a full text search query and return a result set.
*
* @param string $term Raw search term
- * @return MssqlSearchResultSet
+ * @return SqlSearchResultSet
* @access public
*/
function searchText( $term ) {
$resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
- return new MssqlSearchResultSet( $resultSet, $this->searchTerms );
+ return new SqlSearchResultSet( $resultSet, $this->searchTerms );
}
/**
* Perform a title-only search query and return a result set.
*
* @param string $term Raw search term
- * @return MssqlSearchResultSet
+ * @return SqlSearchResultSet
* @access public
*/
function searchTitle( $term ) {
$resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
- return new MssqlSearchResultSet( $resultSet, $this->searchTerms );
+ return new SqlSearchResultSet( $resultSet, $this->searchTerms );
}
/**
*/
function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
- $lc = SearchEngine::legalSearchChars();
+ $lc = $this->legalSearchChars();
$this->searchTerms = array();
# @todo FIXME: This doesn't handle parenthetical expressions.
return $this->db->query( $sql, 'SearchMssql::updateTitle' );
}
}
-
-/**
- * @ingroup Search
- */
-class MssqlSearchResultSet extends SearchResultSet {
- function __construct( $resultSet, $terms ) {
- $this->mResultSet = $resultSet;
- $this->mTerms = $terms;
- }
-
- function termMatches() {
- return $this->mTerms;
- }
-
- function numRows() {
- return $this->mResultSet->numRows();
- }
-
- function next() {
- $row = $this->mResultSet->fetchObject();
- if ( $row === false ) {
- return false;
- }
- return new SearchResult( $row );
- }
-}