PHPackages                             ramzi-alqrainy/solr-php - 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. ramzi-alqrainy/solr-php

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

ramzi-alqrainy/solr-php
=======================

A PHP library for indexing and searching documents within an Apache Solr installation.

48282PHP

Since Dec 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Ramzi-Alqrainy/solr-php)[ Packagist](https://packagist.org/packages/ramzi-alqrainy/solr-php)[ RSS](/packages/ramzi-alqrainy-solr-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

solr-php
========

[](#solr-php)

A PHP library for indexing and searching documents within an Apache Solr installation.

Features :
----------

[](#features-)

1. Comapatable with Solr 7.x
2. Quering, deleting, optimizing.
3. Fast by using curl instead of file\_get\_content
4. Using json for indexing instead of xml and you can use xml.

Installation :
--------------

[](#installation-)

Install Composer In Your Project

`curl -sS https://getcomposer.org/installer | php`

Install Solr PHP Client Library In Your Project

`vim composer.json`

```
"require": {

    "Ramzi-Alqrainy/solr-php": "dev-master",

}

```

`$ php composer.phar install`

How to use it :
---------------

[](#how-to-use-it-)

Normal querying of Solr is very simple with this library to show an example:

```
		// Build Solr query
		$options = array (
				'qf' => 'contact_ss ',
				'q.op' => 'OR',
				'defType' => 'edismax',
				'sort' => 'contact_id desc',
		);
Yii::$app->solr->get ( $query, $offset, $limit, $options );
var_dump($results->response->numFound);
```

That is what it takes to query Apche Solr. should use `Yii::$app->solr` (or whatever you have called the Solr application component in your configuration).

To setup the application you merely add it to your configuration. As an example:

```
    'components' => [
    	'solr'=>[
    		'class'=>'common\components\ApacheSolr',
    		'host'=>'localhost',
    		'port'=>8983,
    		'indexPath'=>'/solr/collection1'
    	],
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/abb4528e24316dc783505587fa784101f893a597917de028c97de5a97a9bd3de?d=identicon)[ramzi.alqrainy](/maintainers/ramzi.alqrainy)

---

Top Contributors

[![Ramzi-Alqrainy](https://avatars.githubusercontent.com/u/4533327?v=4)](https://github.com/Ramzi-Alqrainy "Ramzi-Alqrainy (30 commits)")

### Embed Badge

![Health badge](/badges/ramzi-alqrainy-solr-php/health.svg)

```
[![Health](https://phpackages.com/badges/ramzi-alqrainy-solr-php/health.svg)](https://phpackages.com/packages/ramzi-alqrainy-solr-php)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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