Browse files

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
  • Loading branch information...
1 parent b1b6ebf commit cf8ef35e5f2c18601b19ba272d0661844abf2d48 diml committed Sep 12, 2007
Showing with 8 additions and 2 deletions.
  1. +6 −0 search/indexer.php
  2. +2 −2 search/indexlib.php
View
6 search/indexer.php
@@ -93,9 +93,15 @@
$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();
View
4 search/indexlib.php
@@ -169,7 +169,7 @@ class IndexDBControl {
/**
* does the table exist?
- *
+ * OBSOLETE
*/
public function checkTableExists() {
global $CFG, $db;
@@ -186,7 +186,7 @@ public function checkTableExists() {
/**
* is our database setup valid?
- *
+ * OBSOLETE - Database is installed at install and should not be dropped out
*/
public function checkDB() {
global $CFG, $db;

0 comments on commit cf8ef35

Please sign in to comment.