From: diml <diml> Date: Wed, 12 Sep 2007 21:22:15 +0000 (+0000) Subject: changes reindexing strategy : deletes records rather than create back table X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cf8ef35e5f2c18601b19ba272d0661844abf2d48;p=moodle.git changes reindexing strategy : deletes records rather than create back table checkDB() and checkTableExists() in indexlib.php are obsolete table name synced with search block install.xml table name --- diff --git a/search/indexer.php b/search/indexer.php index bd231d7ae2..06021ee38f 100644 --- a/search/indexer.php +++ b/search/indexer.php @@ -93,9 +93,15 @@ else { $index = new Zend_Search_Lucene($index_path, true); +/* +OBSOLETE REGENERATION - DB installs with search block by now if (!$dbcontrol->checkDB()) { search_pexit("Database error. Please check settings/files."); } +*/ +// New regeneration +mtrace("Deleting old index entries."); +delete_records('search_documents'); //begin timer search_stopwatch(); diff --git a/search/indexlib.php b/search/indexlib.php index f802be7691..7ed1be7752 100644 --- a/search/indexlib.php +++ b/search/indexlib.php @@ -169,7 +169,7 @@ class IndexDBControl { /** * does the table exist? - * + * OBSOLETE */ public function checkTableExists() { global $CFG, $db; @@ -186,7 +186,7 @@ class IndexDBControl { /** * is our database setup valid? - * + * OBSOLETE - Database is installed at install and should not be dropped out */ public function checkDB() { global $CFG, $db;