Skip to content

Commit

Permalink
changes reindexing strategy : deletes records rather than create back…
Browse files Browse the repository at this point in the history
… table

checkDB() and checkTableExists() in indexlib.php are obsolete
table name synced with search block install.xml table name
  • Loading branch information
diml committed Sep 12, 2007
1 parent b1b6ebf commit cf8ef35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions search/indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions search/indexlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class IndexDBControl {

/**
* does the table exist?
*
* OBSOLETE
*/
public function checkTableExists() {
global $CFG, $db;
Expand All @@ -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;
Expand Down

0 comments on commit cf8ef35

Please sign in to comment.