mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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
This commit is contained in:
parent
b1b6ebf437
commit
cf8ef35e5f
2 changed files with 8 additions and 2 deletions
|
@ -93,9 +93,15 @@ else {
|
||||||
|
|
||||||
$index = new Zend_Search_Lucene($index_path, true);
|
$index = new Zend_Search_Lucene($index_path, true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
OBSOLETE REGENERATION - DB installs with search block by now
|
||||||
if (!$dbcontrol->checkDB()) {
|
if (!$dbcontrol->checkDB()) {
|
||||||
search_pexit("Database error. Please check settings/files.");
|
search_pexit("Database error. Please check settings/files.");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
// New regeneration
|
||||||
|
mtrace("Deleting old index entries.");
|
||||||
|
delete_records('search_documents');
|
||||||
|
|
||||||
//begin timer
|
//begin timer
|
||||||
search_stopwatch();
|
search_stopwatch();
|
||||||
|
|
|
@ -169,7 +169,7 @@ class IndexDBControl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* does the table exist?
|
* does the table exist?
|
||||||
*
|
* OBSOLETE
|
||||||
*/
|
*/
|
||||||
public function checkTableExists() {
|
public function checkTableExists() {
|
||||||
global $CFG, $db;
|
global $CFG, $db;
|
||||||
|
@ -186,7 +186,7 @@ class IndexDBControl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is our database setup valid?
|
* is our database setup valid?
|
||||||
*
|
* OBSOLETE - Database is installed at install and should not be dropped out
|
||||||
*/
|
*/
|
||||||
public function checkDB() {
|
public function checkDB() {
|
||||||
global $CFG, $db;
|
global $CFG, $db;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue