* Oracle search engine
*
* Copyright © 2004 Brion Vibber <brion@pobox.com>
- * http://www.mediawiki.org/
+ * https://www.mediawiki.org/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Search engine hook base class for Oracle (ConText).
* @ingroup Search
*/
-class SearchOracle extends SearchEngine {
+class SearchOracle extends SearchDatabase {
private $reservedWords = array(
'ABOUT' => 1,
'WITHIN' => 1,
);
- /**
- * Creates an instance of this class
- * @param $db DatabasePostgres: database object
- */
- function __construct( $db ) {
- parent::__construct( $db );
- }
-
/**
* Perform a full text search query and return a result set.
*
return new MySQLSearchResultSet( $resultSet, $this->searchTerms );
}
- /**
- * Return a partial WHERE clause to exclude redirects, if so set
- * @return String
- */
- function queryRedirect() {
- if ( $this->showRedirects ) {
- return '';
- } else {
- return 'AND page_is_redirect=0';
- }
- }
-
/**
* Return a partial WHERE clause to limit the search to the given namespaces
* @return String
*/
function getQuery( $filteredTerm, $fulltext ) {
return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
- $this->queryRedirect() . ' ' .
$this->queryNamespaces() . ' ' .
$this->queryRanking( $filteredTerm, $fulltext ) . ' ' );
}
$t = preg_replace( '/([-&|])/', '\\\\$1', $t );
return $t;
}
+
/**
* Create or update the search index record for the given page.
* Title and text should be pre-processed.