synergy/solarium-module

Zend Framework 3 integration with solarium solr search client

Installs: 388

Dependents: 1

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

Type:zf3-module

v4.1.0 2017-10-01 22:09 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 Zend\Paginator.

$paginator = new \Zend\Paginator\Paginator(
    new \SynergySolarium\Paginator\Adapter\SolariumPaginator($client, $query)
);
$paginator->setCurrentPageNumber($page);
$paginator->setItemCountPerPage($countPerPage);