PHPackages                             dama/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. dama/solarium-bundle

Abandoned → [nelmio/solarium-bundle](/?search=nelmio%2Fsolarium-bundle)ArchivedSymfony-bundle[Search &amp; Filtering](/categories/search)

dama/solarium-bundle
====================

Integrates the Solarium library as a Symfony bundle

v1.3.0(4y ago)127.4kMITPHPPHP ^7.2 || ^8.0

Since Apr 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dmaicher/solarium-bundle)[ Packagist](https://packagist.org/packages/dama/solarium-bundle)[ RSS](/packages/dama-solarium-bundle/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

!! ABANDONED !! Use `nelmio/solarium-bundle` instead
====================================================

[](#-abandoned--use-nelmiosolarium-bundle-instead)

About
-----

[](#about)

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

This Bundle is partially based on [NelmioSolariumBundle](https://github.com/nelmio/NelmioSolariumBundle) and is fully compatible with Symfony 5 and Solarium 5.2.

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

[](#installation)

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

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

Add the DAMASolariumBundle to your AppKernel.php

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

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

[](#basic-configuration)

Quick-start configuration:

```
dama_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:

```
dama_solarium:
    endpoints:
        default:
            scheme: http
            host: localhost
            port: 8983
            path: /solr
            core: active
    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)

```
dama_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

```
dama_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');
```

You can also have multiple endpoints within the same client

```
dama_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 which is the default endpoint

```
dama_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

```
dama_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).

```
/** @var DAMA\SolariumBundle\ClientRegistryInterface $registry */
$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:

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

Overriding the Client class
---------------------------

[](#overriding-the-client-class)

To change the client class, you can set the client\_class option:

```
dama_solarium:
    clients:
        default:
            client_class: Solarium\Core\Client
```

Customizing the HTTP Adapter used by the Client
-----------------------------------------------

[](#customizing-the-http-adapter-used-by-the-client)

If you need to customize the Adapter that is used by the Client to perform HTTP requests to Solr then you can use the `adapter_service` option to specify the ID of a symfony service to be used as an adapter:

```
dama_solarium:
    clients:
        default:
            adapter_service: 'my.custom.adapter.service'
```

HTTP Request timeout
--------------------

[](#http-request-timeout)

If you are using the default adapter (`Curl`) and did not customize the `adapter_service` then you can use the `adapter_timeout` option to customize the timeout. Solarium uses a timeout of 5 seconds by default.

```
dama_solarium:
    clients:
        default:
            adapter_timeout: 10
```

License
-------

[](#license)

Released under the MIT License, see LICENSE.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Total

5

Last Release

1663d ago

PHP version history (3 changes)v1.0.0PHP ^7.1

v1.2.0PHP ^7.1 || ^8.0

v1.3.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4a4302004f70b830dcd915406f31086100c98c99855488e74066664a446b39c?d=identicon)[dmaicher](/maintainers/dmaicher)

---

Top Contributors

[![dmaicher](https://avatars.githubusercontent.com/u/921145?v=4)](https://github.com/dmaicher "dmaicher (19 commits)")

---

Tags

phpsolariumsolrsymfonysymfony-bundlesearchsymfonybundlesolrsolarium

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[nelmio/solarium-bundle

Integration with solarium solr client.

1493.0M12](/packages/nelmio-solarium-bundle)[floriansemm/solr-bundle

Symfony Solr integration bundle

12280.2k2](/packages/floriansemm-solr-bundle)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)[rollerworks/search-bundle

RollerworksSearch Bundle

1015.8k1](/packages/rollerworks-search-bundle)

PHPackages © 2026

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