PHPackages                             bluem/silex-solr-provider - 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. bluem/silex-solr-provider

AbandonedArchivedLibrary[Search &amp; Filtering](/categories/search)

bluem/silex-solr-provider
=========================

Provides Apache Solr 4.\* connectivity for Silex, Solr extension v2

1.0.1(11y ago)1125BSD-2-ClausePHPPHP &gt;=5.3.0

Since Apr 2Pushed 6y ago2 watchersCompare

[ Source](https://github.com/BlueM/silex-solr-provider)[ Packagist](https://packagist.org/packages/bluem/silex-solr-provider)[ Docs](https://github.com/BlueM/silex-solr-provider)[ RSS](/packages/bluem-silex-solr-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/70d0ee9d3b6683378a6433db76fce1b3b385aa565719e3374466b8d58c02de86/68747470733a2f2f7472617669732d63692e6f72672f426c75654d2f73696c65782d736f6c722d70726f76696465722e737667)](https://travis-ci.org/BlueM/silex-solr-provider)

**As Silex is discontinued, so is this project. It will not receive udpates or fixes.**

Overview
========

[](#overview)

What is it?
-----------

[](#what-is-it)

This repository contains a [Silex](https://github.com/silexphp/Silex) service provider which provides [Apache Solr](http://lucene.apache.org/solr/) version 4 or 5 connectivity for Silex 1.2+, via the [PHP Solr extension](http://php.net/solr) v2.

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

[](#installation)

The preferred way to install this library is through [Composer](https://getcomposer.org). For this, add `"bluem/silex-solr-provider": "~1.0"` (for Silex 1.2+) or `"bluem/silex-solr-provider": "~2.0@dev"` (for Silex2@dev) respectively to the requirements in your `composer.json` file. As this library uses [semantic versioning](http://semver.org), you will get fixes and feature additions when running composer update, but not changes which break the API.

Alternatively, you can clone the repository using git or download a tagged release. As with the Composer-based installation, you have to pay attention to the Silex version: when using Silex 1.2+, you will need a 1.\* release of the service provider, and for Silex 2, you will need dev-master.

Usage
=====

[](#usage)

Registering the provider
------------------------

[](#registering-the-provider)

To make Silex aware of the provider, add this to your `app.php`:

```
$app->register(new BlueM\Silex\Provider\SolrServiceProvider());
```

Configuration
-------------

[](#configuration)

You can define Solr settings such as the hostname in the usual Silex way in `config/prod.php` and `config/dev.php`.

Example:

```
$app['solr.hostname'] = '127.0.0.1';
$app['solr.path']     = 'solr/core0';
```

You can use all options which the `SolrClient` class constructor accepts. For a list, see . Please note that `SolrClient` does not accept an empty options array, wich means you have to provide at least 1 option, otherwise you will get an exception.

Another (IMHO less recommendable way) is to pass the options as 2nd argument to `Silex\Application` when registering the provider:

```
$app->register(
    new BlueM\Silex\Provider\SolrServiceProvider(),
    ['solr.hostname' => '127.0.0.1']
);
```

In either case, you can use a different string (instead of “solr”) as configuration key prefix by passing this string as argument to the provider’s constructor. This comes also in handy when multiple cores are needed:

```
// In app.php:
$app->register(new BlueM\Silex\Provider\SolrServiceProvider('solr-core0'));
$app->register(new BlueM\Silex\Provider\SolrServiceProvider('solr-core1'));

// In config/prod.php:
$app['solr-core0.hostname'] = '127.0.0.1';
$app['solr-core0.path']     = 'solr/core0';
$app['solr-core1.hostname'] = '127.0.0.1';
$app['solr-core1.path']     = 'solr/core1';

// In your project code:
$app['solr-core0']->doSomethingWithCore0();
$app['solr-core1']->doSomethingWithCore1();
```

Version History
===============

[](#version-history)

- 1.0.1: Improve Readme, fix a doc comment
- 1.0: Works

Author &amp; License
====================

[](#author--license)

This code was written by Carsten Blüm ([www.bluem.net](http://www.bluem.net)) and licensed under the BSD 2-Clause license.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~5 days

Total

2

Last Release

4058d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1493457?v=4)[Carsten Blüm](/maintainers/BlueM)[@BlueM](https://github.com/BlueM)

---

Top Contributors

[![BlueM](https://avatars.githubusercontent.com/u/1493457?v=4)](https://github.com/BlueM "BlueM (30 commits)")

---

Tags

searchsolrsilex

### Embed Badge

![Health badge](/badges/bluem-silex-solr-provider/health.svg)

```
[![Health](https://phpackages.com/badges/bluem-silex-solr-provider/health.svg)](https://phpackages.com/packages/bluem-silex-solr-provider)
```

###  Alternatives

[solarium/solarium

PHP Solr client

93432.7M98](/packages/solarium-solarium)[netgen/query-translator

Query Translator is a search query translator with AST representation

2042.0M6](/packages/netgen-query-translator)[nelmio/solarium-bundle

Integration with solarium solr client.

1493.0M12](/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.

1473.0M32](/packages/apache-solr-for-typo3-solr)[floriansemm/solr-bundle

Symfony Solr integration bundle

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

Search Engine Abstraction Layer

32207.9k53](/packages/cmsig-seal)

PHPackages © 2026

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