synergy/solarium-module

Zend Framework 3 integration with solarium solr search client

v5.0.0 2020-04-10 12:05 UTC

This package is auto-updated.

Last update: 2020-06-10 12:37:35 UTC


README

Latest Stable Version Total Downloads Build Status Coverage Status composer.lock

SynergySolarium module

About

The SynergySolarium module provides ZF3 integration with Solarium solr client.

It also integrates with Zend Developer Tools.

Inspired by Ewgo/SolariumModule ZF2 module

Installation

$ php composer.phar require synergy/solarium-module

Add "SynergySolarium" to the list of loaded modules.

Basic configuration

array(
    'solarium' => array(
        'endpoint' => array(
            'default' => array(
                'host' => 'localhost',
                'port' => 8983,
                'path' => '/solr',
                'core' => 'default',
                'timeout' => 5
            )
            //...
        )
    )
)

Usage

$client = $serviceLocator->get('Solarium\Client'); // Or the 'solarium' alias
$query = $client->createSelect();
$resultset = $client->execute($query);

For more information see the Solarium documentation.

Paginator adapter

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);