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

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