synergy/solarium-module

Zend Framework 3 integration with solarium solr search client

Installs: 3 816

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 2

Open Issues: 17

Type:zf3-module


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