put opening of index into try/catch for better handling of missing index

This commit is contained in:
steinm 2012-12-13 21:27:24 +00:00
parent d5b629769b
commit 7d898a7efc

View File

@ -30,8 +30,12 @@ class LetoDMS_Lucene_Indexer {
protected $indexname;
function open($luceneDir) { /* {{{ */
try {
$index = Zend_Search_Lucene::open($luceneDir);
return($index);
} catch (Exception $e) {
return null;
}
} /* }}} */
function create($luceneDir) { /* {{{ */