fix setting limit

This commit is contained in:
Uwe Steinmann 2023-01-08 16:21:08 +01:00
parent 30ab2f9ef7
commit 3cc7497863

View File

@ -137,7 +137,7 @@ class SeedDMS_Lucene_Search {
$recs = array(); $recs = array();
$c = 0; $c = 0;
foreach($hits as $hit) { foreach($hits as $hit) {
if($c >= $limit['offset'] && ($c-$limit['offset'] < $limit)) if($c >= $limit['offset'] && ($c-$limit['offset'] < $limit['limit']))
$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->document_id); $recs[] = array('id'=>$hit->id, 'document_id'=>$hit->document_id);
$c++; $c++;
} }