Skip to content
Snippets Groups Projects
Commit 8a811721 authored by David Maus's avatar David Maus
Browse files

Set offset and limit in parameter bag

* VuFindSearch/Backend/Solr/Backend.php (search): Set offset and limit
  in parameter bag.
* VuFindSearch/Backend/Solr/Connector.php (search): Change function signature,
  offset and limit contained in parameter bag.
parent 9730c4e7
No related merge requests found
......@@ -169,8 +169,10 @@ class Backend implements BackendInterface, MoreLikeThis, RetrieveBatchInterface
}
}
$params->set('rows', $limit);
$params->set('start', $offset);
$params->mergeWith($this->getQueryBuilder()->build($query));
$response = $this->connector->search($params, $offset, $limit);
$response = $this->connector->search($params);
$collection = $this->createRecordCollection($response);
$this->injectSourceIdentifier($collection);
......
......@@ -208,15 +208,11 @@ class Connector
* Execute a search.
*
* @param ParamBag $params Parameters
* @param integer $offset Search offset
* @param integer $limit Search limit
*
* @return string
*/
public function search(ParamBag $params, $offset, $limit)
public function search(ParamBag $params)
{
$params->set('start', $offset);
$params->set('rows', $limit);
return $this->select($params);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment