Index: trunk/extensions/OracleTextSearch/SearchOracleText.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | |
6 | 6 | |
7 | 7 | public function update( $id, $title, $text ) { |
8 | | - global $wgExIndexMIMETypes; |
| 8 | + global $wgExIndexMIMETypes, $wgExIndexOnHTTP; |
9 | 9 | |
10 | 10 | parent::update( $id, $title, $text ); |
11 | 11 | |
— | — | @@ -13,14 +13,14 @@ |
14 | 14 | if ( in_array( $file->getMimeType(), $wgExIndexMIMETypes ) ) { |
15 | 15 | $dbw = wfGetDB(DB_MASTER); |
16 | 16 | //$dbw->query("CALL CTXSYS.CTX_OUTPUT.START_LOG('wiki_ctx.log')"); //use for INTERNAL debuging ONLY!!! |
17 | | - |
| 17 | + |
18 | 18 | $url = $wgExIndexOnHTTP ? preg_replace( '/^https:/i', 'http:', $file->getFullUrl() ) : $file->getFullUrl(); |
19 | 19 | $dbw->update('searchindex', |
20 | 20 | array( 'si_url' => $url ), |
21 | 21 | array( 'si_page' => $id ), |
22 | 22 | 'SearchIndexUpdate:update' ); |
23 | 23 | wfDebugLog( 'OracleTextSearch', 'Updated si_url for page ' . $id ); |
24 | | - |
| 24 | + |
25 | 25 | $index = $dbw->getProperty('mTablePrefix')."si_url_idx"; |
26 | 26 | $dbw->query( "CALL ctx_ddl.sync_index('$index')" ); |
27 | 27 | wfDebugLog( 'OracleTextSearch', 'Synced index: '.$index); |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | |
31 | 31 | function parseQuery( $filteredText, $fulltext ) { |
32 | 32 | $match = parent::parseQuery( $filteredText, $fulltext ); |
33 | | - |
| 33 | + |
34 | 34 | if ( $fulltext ) { |
35 | 35 | $field = $this->getIndexField($fulltext); |
36 | 36 | $searchon = preg_replace( "/ CONTAINS\($field, ('.*'), 1\) > 0 /", "\\1", $match); |