PHPackages                             btmoda/solarium-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. btmoda/solarium-bundle

ActiveSymfony-bundle[Search &amp; Filtering](/categories/search)

btmoda/solarium-bundle
======================

Integration with solarium solr client.

4.0.1(8y ago)01.3kMITPHPPHP &gt;=5.5

Since Jul 31Pushed 8y ago19 watchersCompare

[ Source](https://github.com/btmoda/NelmioSolariumBundle)[ Packagist](https://packagist.org/packages/btmoda/solarium-bundle)[ RSS](/packages/btmoda-solarium-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (3)Versions (17)Used By (0)

NelmioSolarium Bundle
=====================

[](#nelmiosolarium-bundle)

[![Latest Version](https://camo.githubusercontent.com/65390736276bdc8d16adec7924fad143da5dd7065de6b141efa4c2f2092ca467/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6e656c6d696f2f4e656c6d696f536f6c617269756d42756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/nelmio/NelmioSolariumBundle/releases)[![Total Downloads](https://camo.githubusercontent.com/c702a2c04e0745b99496cee871facb0e0569be18bbc6709658b7be586f3c77c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e656c6d696f2f736f6c617269756d2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nelmio/solarium-bundle)

About
-----

[](#about)

The NelmioSolariumBundle provides integration with the [solarium](http://www.solarium-project.org)solr client.

Installation
------------

[](#installation)

Require the `nelmio/solarium-bundle` package in your composer.json and update your dependencies.

```
$ composer require nelmio/solarium-bundle
```

Add the NelmioSolariumBundle to your AppKernel.php

```
public function registerBundles()
{
    $bundles = array(
        ...
        new Nelmio\SolariumBundle\NelmioSolariumBundle(),
        ...
    );
    ...
}
```

Basic configuration
-------------------

[](#basic-configuration)

Quick-start configuration:

```
nelmio_solarium: ~
```

Gives you a Solarium\_Client service with default options (`http://localhost:8983/solr`)

```
    $client = $this->get('solarium.client');
```

Configure your endpoints in config.yml:

```
nelmio_solarium:
    endpoints:
        default:
            scheme: http
            host: localhost
            port: 8983
            path: /solr
            core: active
            timeout: 5
    clients:
        default:
            endpoints: [default]
```

If you only have one endpoint, the `client` section is not necessary

Usage
-----

[](#usage)

```
$client = $this->get('solarium.client');
$select = $client->createSelect();
$select->setQuery('foo');
$results = $client->select($select);
```

For more information see the [Solarium documentation](http://solarium.readthedocs.io/en/stable/).

Multiple clients and endpoints
------------------------------

[](#multiple-clients-and-endpoints)

```
nelmio_solarium:
    endpoints:
        default:
            host: 192.168.1.2
        another:
            host: 192.168.1.3
    clients:
        default:
            endpoints: [default]
        another:
            endpoints: [another]
```

```
    $defaultClient = $this->get('solarium.client');
    $anotherClient = $this->get('solarium.client.another');
```

You may also change `default` name with your own, but don't forget change `default_client` option if you want to get access to `solarium.client` service

```
nelmio_solarium:
    default_client: firstOne
    endpoints:
        firstOne:
            host: 192.168.1.2
        anotherOne:
            host: 192.168.1.3
    clients:
        firstOne:
            endpoints: [firstOne]
        anotherOne:
            endpoints: [anotherOne]
```

```
    $firstOneClient = $this->get('solarium.client');
    //or
    $firstOneClient = $this->get('solarium.client.firstOne');

    $anotherOneClient = $this->get('solarium.client.anotherOne');
```

Starting from Solarium 3.x you can also have multiple endpoints within the same client

```
nelmio_solarium:
    endpoints:
        default:
            host: 192.168.1.2
        another:
            host: 192.168.1.3
    # if you are using all the endpoints, the clients section is not necessary
    clients:
        default:
            endpoints: [default, another]
```

You can also set wich is the default endpoint

```
nelmio_solarium:
    endpoints:
        default:
            host: 192.168.1.2
        another:
            host: 192.168.1.3
    clients:
        default:
            endpoints: [default, another]
            default_endpoint: another
```

You can combine both multiple client and endpoints too

```
nelmio_solarium:
    endpoints:
        one:
            host: 192.168.1.2
        two:
            host: 192.168.1.3
        three:
            host: 192.168.1.4
    clients:
        firstOne:
            endpoints: [one, two]
            default_endpoint: two
        secondOne:
            endpoints: [two, three]
            default_endpoint: three
```

Client registry
---------------

[](#client-registry)

You can also use the service `solarium.client_registry` to access the clients you have configured using the names you have used in the configuration (with the example above):

```
$registry = $this->get('solarium.client_registry');
$firstOne = $registry->getClient('firstOne');
$secondOne = $registry->getClient('secondOne');
```

or if you have configured a default client

```
$registry = $this->get('solarium.client_registry');
$default = $registry->getClient();
```

Plugins
-------

[](#plugins)

Solarium works with plugins. If you want to use your own plugins, you can register a plugin in the bundle configuration either with a service id or the plugin class:

```
nelmio_solarium:
    clients:
        default:
            plugins:
                test_plugin_service:
                    plugin_service: plugin _service_id
                test_plugin_classname:
                    plugin_class: Some\Plugin\TestPlugin
```

Overriding Classes
------------------

[](#overriding-classes)

To change the adapter or client classes, you can set the client\_class and adapter\_class options:

```
nelmio_solarium:
    clients:
        default:
            client_class: Solarium\Core\Client
            adapter_class: Solarium\Core\Client\Adapter\Http
```

License
-------

[](#license)

Released under the MIT License, see LICENSE.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~137 days

Recently: every ~119 days

Total

16

Last Release

3011d ago

Major Versions

v1.1.0 → v2.0.02013-03-27

v2.4.0 → v3.0.0-beta2018-01-12

v3.0.0-beta → v4.0.02018-03-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/956cb3cca61b15e16289c109ec8cbc761aa2d0055c0ecd5a63aedea73e4d7379?d=identicon)[modanisa](/maintainers/modanisa)

---

Top Contributors

[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (64 commits)")[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (16 commits)")[![thePanz](https://avatars.githubusercontent.com/u/226021?v=4)](https://github.com/thePanz "thePanz (14 commits)")[![wiistriker](https://avatars.githubusercontent.com/u/967817?v=4)](https://github.com/wiistriker "wiistriker (12 commits)")[![shieldo](https://avatars.githubusercontent.com/u/97280?v=4)](https://github.com/shieldo "shieldo (6 commits)")[![uwej711](https://avatars.githubusercontent.com/u/648874?v=4)](https://github.com/uwej711 "uwej711 (3 commits)")[![adrienbrault](https://avatars.githubusercontent.com/u/611271?v=4)](https://github.com/adrienbrault "adrienbrault (3 commits)")[![acasademont](https://avatars.githubusercontent.com/u/825021?v=4)](https://github.com/acasademont "acasademont (2 commits)")[![benjamindulau](https://avatars.githubusercontent.com/u/430689?v=4)](https://github.com/benjamindulau "benjamindulau (2 commits)")[![modanisabt](https://avatars.githubusercontent.com/u/9268543?v=4)](https://github.com/modanisabt "modanisabt (2 commits)")[![smoench](https://avatars.githubusercontent.com/u/183530?v=4)](https://github.com/smoench "smoench (2 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (1 commits)")[![m0ppers](https://avatars.githubusercontent.com/u/819421?v=4)](https://github.com/m0ppers "m0ppers (1 commits)")[![bpolaszek](https://avatars.githubusercontent.com/u/5569077?v=4)](https://github.com/bpolaszek "bpolaszek (1 commits)")[![JoeKre](https://avatars.githubusercontent.com/u/9037466?v=4)](https://github.com/JoeKre "JoeKre (1 commits)")[![harmstyler](https://avatars.githubusercontent.com/u/1421469?v=4)](https://github.com/harmstyler "harmstyler (1 commits)")[![vierbergenlars](https://avatars.githubusercontent.com/u/1194648?v=4)](https://github.com/vierbergenlars "vierbergenlars (1 commits)")[![volkan](https://avatars.githubusercontent.com/u/28885?v=4)](https://github.com/volkan "volkan (1 commits)")[![Rubinum](https://avatars.githubusercontent.com/u/5645798?v=4)](https://github.com/Rubinum "Rubinum (1 commits)")

---

Tags

searchsolrsolarium

### Embed Badge

![Health badge](/badges/btmoda-solarium-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/btmoda-solarium-bundle/health.svg)](https://phpackages.com/packages/btmoda-solarium-bundle)
```

###  Alternatives

[nelmio/solarium-bundle

Integration with solarium solr client.

1493.1M15](/packages/nelmio-solarium-bundle)[apache-solr-for-typo3/solr

Apache Solr for TYPO3 - Apache Solr for TYPO3 is the enterprise search server you were looking for with special features such as Faceted Search or Synonym Support and incredibly fast response times of results within milliseconds.

1463.2M42](/packages/apache-solr-for-typo3-solr)[floriansemm/solr-bundle

Symfony Solr integration bundle

12280.4k2](/packages/floriansemm-solr-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[sammaye/yii2-solr

Solr plugin for the Yii2 framework built ontop of Solarium

1063.3k](/packages/sammaye-yii2-solr)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
