PHPackages                             gigablah/fsphinxphp - 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. [API Development](/categories/api)
4. /
5. gigablah/fsphinxphp

ActiveLibrary[API Development](/categories/api)

gigablah/fsphinxphp
===================

Facet extension for Sphinx Search

1.1.1(12y ago)5362.8k↓26.2%15[2 issues](https://github.com/gigablah/fsphinxphp/issues)LGPL-3.0PHPPHP &gt;=5.3.0

Since Nov 12Pushed 10y ago9 watchersCompare

[ Source](https://github.com/gigablah/fsphinxphp)[ Packagist](https://packagist.org/packages/gigablah/fsphinxphp)[ Docs](https://github.com/gigablah/fsphinxphp)[ RSS](/packages/gigablah-fsphinxphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

**FSphinx** is a PHP port of the \[fSphinx\] [1](http://github.com/alexksikes/fSphinx) Python library, which extends the Sphinx API to easily perform faceted search.

What's faceted search?
----------------------

[](#whats-faceted-search)

Think of "filtering", "refining" or "drilling down". For example, when searching through a database of movie titles, you could get a list of clickable refinement options such as actors, directors, genre and year of release. Unlike static hierarchical navigation, facets are calculated as you search so you always get options that are relevant to your current query terms.

How do I use this?
------------------

[](#how-do-i-use-this)

You can incorporate it into your project using \[Composer\] [2](http://getcomposer.org/). Create a `composer.json` file and run `composer install`:

```
{
    "require": {
        "gigablah/fsphinxphp": "1.1.*"
    }
}

```

This generates an autoloader with namespace mappings:

```
require __DIR__ . '/vendor/autoload.php';
$fsphinx = new FSphinx\FSphinxClient();
$fsphinx->setServer('127.0.0.1', 9312);
$fsphinx->setDefaultIndex('items');
$fsphinx->setMatchMode(FSphinx\FSphinxClient::SPH_MATCH_EXTENDED2);
$fsphinx->attachQueryParser(new FSphinx\MultiFieldQuery());
$fsphinx->attachFacets(new FSphinx\Facet('actor'), new FSphinx\Facet('director'), new FSphinx\Facet('year'));
$results = $fsphinx->query('action');
foreach ($results['facets'] as $facet) print_r($facet);

```

If you're not using Composer, you can use `fsphinxapi.php` to load the FSphinx classes.

To learn more, please refer to the \[tutorial\] [3](http://github.com/gigablah/fsphinxphp/tree/master/docs/) or the \[documentation\] [4](http://gigablah.github.com/fsphinxphp/).

Requirements
------------

[](#requirements)

- PHP 5.3+ (namespaces, anonymous functions)
- Sphinx 1.10+ (string attributes)

Author
------

[](#author)

\[Chris Heng\] [5](http://kuanyen.net)

License
-------

[](#license)

Released under the GNU LGPL version 3. See the LICENSE file for more details.

Acknowledgements
----------------

[](#acknowledgements)

This library is based off the excellent work of \[Alex Ksikes\] [6](http://github.com/alexksikes).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

4610d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c9db29bd91fb91e04478866b21aafca02baea586244fe8e0bc2181f4e16e925?d=identicon)[Gigablah](/maintainers/Gigablah)

---

Top Contributors

[![gigablah](https://avatars.githubusercontent.com/u/471275?v=4)](https://github.com/gigablah "gigablah (14 commits)")

---

Tags

apisearchsphinxfacet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gigablah-fsphinxphp/health.svg)

```
[![Health](https://phpackages.com/badges/gigablah-fsphinxphp/health.svg)](https://phpackages.com/packages/gigablah-fsphinxphp)
```

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69433.0M114](/packages/algolia-algoliasearch-client-php)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[gigablah/sphinxphp

Sphinx Search PHP 5.3+ API with PSR compliance

861.4M16](/packages/gigablah-sphinxphp)[hmerritt/imdb-api

IMDB API that can fetch film data and search results

6911.3k](/packages/hmerritt-imdb-api)

PHPackages © 2026

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