The SynergySolarium module provides ZF3 integration with Solarium solr client.
It also integrates with Zend Developer Tools.
Inspired by Ewgo/SolariumModule ZF2 module
$ php composer.phar require synergy/solarium-module
Add "SynergySolarium" to the list of loaded modules.
array(
'solarium' => array(
'endpoint' => array(
'default' => array(
'host' => 'localhost',
'port' => 8983,
'path' => '/solr',
'core' => 'default',
'timeout' => 5
)
//...
)
)
)
$client = $serviceLocator->get('Solarium\Client'); // Or the 'solarium' alias
$query = $client->createSelect();
$resultset = $client->execute($query);
For more information see the Solarium documentation.
This module also provides an adapter for Laminas\Paginator.
$paginator = new \Laminas\Paginator\Paginator(
new \SynergySolarium\Paginator\Adapter\SolariumPaginator($client, $query)
);
$paginator->setCurrentPageNumber($page);
$paginator->setItemCountPerPage($countPerPage);