recreate an index if opening it fails

This commit is contained in:
Uwe Steinmann 2018-11-21 08:27:40 +01:00
parent 99d9edfc5a
commit 72b1f5d24c

View File

@ -53,9 +53,12 @@ if(!isset($_GET['action']) || $_GET['action'] == 'show') {
} }
} else { } else {
$index = $indexconf['Indexer']::open($settings->_luceneDir); $index = $indexconf['Indexer']::open($settings->_luceneDir);
if(!$index) {
$index = $indexconf['Indexer']::create($settings->_luceneDir);
if(!$index) { if(!$index) {
UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex"));
} }
}
$indexconf['Indexer']::init($settings->_stopWordsFile); $indexconf['Indexer']::init($settings->_stopWordsFile);
} }
} else { } else {