PHPackages                             rpsl/sphinxql - 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. [Database &amp; ORM](/categories/database)
4. /
5. rpsl/sphinxql

ActiveLibrary[Database &amp; ORM](/categories/database)

rpsl/sphinxql
=============

Simple library for work with SphinxQL Api ( uses mysqli php extension )

v1.0.3(11y ago)0113.5kApache-2.0PHPPHP &gt;=5.3.0

Since Oct 1Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Rpsl/SphinxQL)[ Packagist](https://packagist.org/packages/rpsl/sphinxql)[ Docs](https://github.com/Rpsl/SphinxQL)[ RSS](/packages/rpsl-sphinxql/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (4)Used By (0)

SphinxQL
========

[](#sphinxql)

Simple library for work with [SphinxQL](http://sphinxsearch.com/) Api ( uses mysqli php extension )

See [SphinxQL specification](http://sphinxsearch.com/docs/current.html#sphinxql-reference)

##### Example:

[](#example)

```
$sphinxql = new SphinxQL();
$query = $sphinxql->newQuery();
$query
    ->addIndex('my_index')
    ->addField('field_name', 'alias')
    ->addField('another_field')

    ->addFields(
        array(
            array('field' => 'title', 'alias' => 'title_alias'),
            array('field' => 'user_id')
        )
    )

    ->search('some words to search for')

    // string (is given directly to sphinx, so can contain @field directives)
    ->where('time', time()-3600, '>', FALSE)

    // field, value, operator='=', quote=TRUE
    ->whereIn('tags_i_need', array(1, 2, 3), 'all')
    ->whereIn('tags_i_do_not_want', array(4, 5, 6), 'none')

    // field, array values, type='any'
    ->whereIn('tags_i_would_like_one_of', array(7, 8, 9), 'any')

    // field, sort='desc'
    ->order('@weight', 'desc')

    // defaults are 0 and 20, same as the sphinx defaults
    ->offset(10)->limit(50)

    // option name, option value
    ->option('max_query_time', '100')

    ->groupBy('field')

    // sphinx-specific, check their docs
    ->in_group_order_by('another_field', 'desc');

$result = $query->execute();

// get stats
$stats = $sphinx->stats();
```

##### Example with RT Index:

[](#example-with-rt-index)

```
$sphinxql = new SphinxQL();

$result = $sphinxql->query('
    INSERT INTO realtime_index
        (id, title, content)
    VALUES
        ( 1, "title news", "content news" )
    '
);
```

##### Install with composer:

[](#install-with-composer)

```
{
    "require": {
        "rpsl/sphinxql": ">=1"
    }
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

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

Total

3

Last Release

4361d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/265634?v=4)[Виктор Диктор](/maintainers/Rpsl)[@Rpsl](https://github.com/Rpsl)

---

Top Contributors

[![Rpsl](https://avatars.githubusercontent.com/u/265634?v=4)](https://github.com/Rpsl "Rpsl (10 commits)")

---

Tags

searchdatabasemysqlsqlsphinxqlsphinx

### Embed Badge

![Health badge](/badges/rpsl-sphinxql/health.svg)

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

###  Alternatives

[foolz/sphinxql-query-builder

A PHP query builder for SphinxQL and ManticoreQL with MySQLi and PDO drivers.

3232.2M33](/packages/foolz-sphinxql-query-builder)[fobia/laravel-sphinx

A Laravel query builder for SphinxQL

31136.2k](/packages/fobia-laravel-sphinx)[rah/danpu

Zero-dependency MySQL dump library for easily exporting and importing databases

62410.3k11](/packages/rah-danpu)[opis/database

A database abstraction layer over PDO, that provides a powerful and intuitive query builder, bundled with an easy to use schema builder

10085.0k3](/packages/opis-database)

PHPackages © 2026

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