mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 04:56:06 +00:00
throw exeption in find()
This commit is contained in:
parent
8e542b448f
commit
fe43b944c9
|
@ -190,7 +190,8 @@ class SeedDMS_SQLiteFTS_Indexer {
|
|||
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
|
||||
$res = $this->_conn->query($sql." GROUP BY `".$facetname."`");
|
||||
if(!$res)
|
||||
return false;
|
||||
throw new SeedDMS_SQLiteFTS_Exception("Counting records in facet \"$facetname\" failed.");
|
||||
// return false;
|
||||
$facets[$facetname] = array();
|
||||
foreach($res as $row) {
|
||||
if($row[$facetname] && $row['c']) {
|
||||
|
@ -220,7 +221,8 @@ class SeedDMS_SQLiteFTS_Indexer {
|
|||
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
|
||||
$res = $this->_conn->query($sql." GROUP BY `record_type`");
|
||||
if(!$res)
|
||||
return false;
|
||||
throw new SeedDMS_SQLiteFTS_Exception("Counting records in facet \"record_type\" failed.");
|
||||
// return false;
|
||||
$facets['record_type'] = array('document'=>0, 'folder'=>0);
|
||||
foreach($res as $row) {
|
||||
$facets['record_type'][$row['record_type']] = $row['c'];
|
||||
|
@ -239,6 +241,8 @@ class SeedDMS_SQLiteFTS_Indexer {
|
|||
if(!empty($limit['offset']))
|
||||
$sql .= " OFFSET ".(int) $limit['offset'];
|
||||
$res = $this->_conn->query($sql);
|
||||
if(!$res)
|
||||
throw new SeedDMS_SQLiteFTS_Exception("Searching for documents failed.");
|
||||
$hits = array();
|
||||
if($res) {
|
||||
foreach($res as $rec) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user