ewgo/solarium-module

Zend Framework 2 integration with solarium solr client

Installs: 38 020

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 3

Forks: 2

Open Issues: 2

Type:zf2-module

v1.0.2 2013-08-26 15:23 UTC

This package is not auto-updated.

Last update: 2024-12-16 14:18:20 UTC


README

About

The EwgoSolarium module provides ZF2 integration with Solarium solr client.

It also integrates with Zend Developer Tools.

Installation

$ php composer.phar require ewgo/solarium-module

Add "EwgoSolarium" 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 \EwgoSolarium\Paginator\Adapter\SolariumPaginator($client, $query)
);
$paginator->setCurrentPageNumber($page);
$paginator->setItemCountPerPage($countPerPage);