# http://www.gnu.org/copyleft/gpl.html
/**
- * Search engine hook base class for Oracle (ConText).
- * @addtogroup Search
+ * @file
+ * @ingroup Search
*/
+/**
+ * Search engine hook base class for Oracle (ConText).
+ * @ingroup Search
+ */
class SearchOracle extends SearchEngine {
function __construct($db) {
$this->db = $db;
* @private
*/
function queryNamespaces() {
+ if( is_null($this->namespaces) )
+ return '';
$namespaces = implode(',', $this->namespaces);
if ($namespaces == '') {
$namespaces = '0';
'si_title' => $title,
'si_text' => $text
), 'SearchOracle::update' );
+ $dbw->query("CALL ctx_ddl.sync_index('si_text_idx')");
+ $dbw->query("CALL ctx_ddl.sync_index('si_title_idx')");
}
/**
* @param int $id
* @param string $title
*/
- function updateTitle( $id, $title ) {
+ function updateTitle($id, $title) {
$dbw = wfGetDB(DB_MASTER);
$dbw->update('searchindex',
}
}
+/**
+ * @ingroup Search
+ */
class OracleSearchResultSet extends SearchResultSet {
function __construct($resultSet, $terms) {
$this->mResultSet = $resultSet;
function next() {
$row = $this->mResultSet->fetchObject();
- if( $row === false) {
+ if ($row === false)
return false;
- } else {
- return new SearchResult($row);
- }
+ return new SearchResult($row);
}
}
-
-?>