]> git.mjollnir.org Git - moodle.git/commitdiff
changes reindexing strategy : deletes records rather than create back table
authordiml <diml>
Wed, 12 Sep 2007 21:22:15 +0000 (21:22 +0000)
committerdiml <diml>
Wed, 12 Sep 2007 21:22:15 +0000 (21:22 +0000)
checkDB() and checkTableExists() in indexlib.php are obsolete
table name synced with search block install.xml table name

search/indexer.php
search/indexlib.php

index bd231d7ae267610821d0df463a4368385817abea..06021ee38f8af212f4018159217ff639f05d1a9e 100644 (file)
@@ -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();
index f802be769158e49ab89e4b03b4a230b377334cae..7ed1be77528af5a6e7e6134778ebbf0962adbbe6 100644 (file)
@@ -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;