PHPackages                             diezeel/laravel-scout-sphinx - 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. diezeel/laravel-scout-sphinx

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

diezeel/laravel-scout-sphinx
============================

Laravel Scout Sphinx Driver

2.3.2(6y ago)013MITPHPPHP &gt;=7.0

Since Jun 20Pushed 6y agoCompare

[ Source](https://github.com/DieZeeL/laravel-scout-sphinx)[ Packagist](https://packagist.org/packages/diezeel/laravel-scout-sphinx)[ RSS](/packages/diezeel-laravel-scout-sphinx/feed)WikiDiscussions master Synced 2d ago

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

Laravel Scout Sphinx Driver
===========================

[](#laravel-scout-sphinx-driver)

THIS IS MY PERSONAL VERSION FOR MY PROJECT! DESCRIPTION MAYBE UPDATED LATER

[![Build Status](https://camo.githubusercontent.com/f78f3cb18f8a238577540560a0731470a7266a1821b87f861256366139c0501c/68747470733a2f2f7472617669732d63692e6f72672f636f6e7374616e7461626c652f6c61726176656c2d73636f75742d737068696e782e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/constantable/laravel-scout-sphinx)[![Latest Version on Packagist](https://camo.githubusercontent.com/e621c7c47fe48dde6ca8b11be9f276ce1ab5ae338c44030c5dea01d5228fcdc7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e7374616e7461626c652f6c61726176656c2d73636f75742d737068696e782e7376673f7374796c653d666c6174)](https://packagist.org/packages/constantable/laravel-scout-sphinx)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE)

Introduction
------------

[](#introduction)

This package offers advanced functionality for searching and filtering data using [Sphinx search engine](http://sphinxsearch.com/) for Laravel Scout.

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

[](#installation)

### Composer

[](#composer)

Use the following command to install package via composer

```
composer require constantable/laravel-scout-sphinx
```

### Configuration

[](#configuration)

Publish the Scout configuration using the `vendor:publish` Artisan command.

```
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
```

This command will publish the scout.php configuration file to your config directory. Edit this file to set 'sphinxsearch' as a Scout driver:

```
'driver' => env('SCOUT_DRIVER', 'sphinxsearch'),
```

And add default Sphinx connection options

```
    'sphinxsearch' => [
        'host' => env('SPHINX_HOST', 'localhost'),
        'port' => env('SPHINX_PORT', '9306'),
        'socket' => env('SPHINX_SOCKET'),
        'charset' => env('SPHINX_CHARSET'),
    ],
```

Override these variables in your .env file if need

Usage
-----

[](#usage)

- Add the `Laravel\Scout\Searchable` trait to the model you would like to make searchable.
- Customize index name and searchable data for the model:

```
    public function searchableAs()
    {
        return 'posts_index';
    }

    public function toSearchableArray()
    {
        $array = $this->toArray();

        // Customize array...

        return $array;
    }
```

The basic search:

```
$orders = App\Order::search('Star Trek')->get();
```

Please refer to the [Scout documentation](https://laravel.com/docs/master/scout#searching) for additional information. You can run more complex queries on index using callback, set the where clause, orderBy or paginate, for example:

```
$oorders = App\Order::search($keyword, function (SphinxQL $query) {
        return $query->groupBy('description');
    })
    ->where('status', 1)
    ->orderBy('date', 'DESC')
    ->paginate(20);
```

> Note: Changes on Sphinx indexes are only allowed for RT (Real Time) indexes. If you have ones and you need to update/delete records please define `public $isRT = true;` model's property.

Credits
-------

[](#credits)

- [Hyn](https://github.com/hyn)

License
-------

[](#license)

Licensed under the MIT license

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 63% 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 ~15 days

Total

11

Last Release

2365d ago

Major Versions

1.x-dev → 2.02019-09-10

PHP version history (2 changes)1.0PHP &gt;=5.6.4

1.x-devPHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/485433?v=4)[Diez](/maintainers/diez)[@diez](https://github.com/diez)

---

Top Contributors

[![constantable](https://avatars.githubusercontent.com/u/11844178?v=4)](https://github.com/constantable "constantable (17 commits)")[![DieZeeL](https://avatars.githubusercontent.com/u/49496565?v=4)](https://github.com/DieZeeL "DieZeeL (8 commits)")[![Jon78](https://avatars.githubusercontent.com/u/51792370?v=4)](https://github.com/Jon78 "Jon78 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/diezeel-laravel-scout-sphinx/health.svg)

```
[![Health](https://phpackages.com/badges/diezeel-laravel-scout-sphinx/health.svg)](https://phpackages.com/packages/diezeel-laravel-scout-sphinx)
```

###  Alternatives

[teamtnt/laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch

1.1k2.5M28](/packages/teamtnt-laravel-scout-tntsearch-driver)[algolia/scout-extended

Scout Extended extends Laravel Scout adding algolia-specific features

4186.3M6](/packages/algolia-scout-extended)[matchish/laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout

7431.6M2](/packages/matchish-laravel-scout-elasticsearch)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[typesense/laravel-scout-typesense-driver

Laravel Scout Driver for Typesense

144637.2k3](/packages/typesense-laravel-scout-typesense-driver)[zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

33340.2k](/packages/zing-laravel-scout-opensearch)

PHPackages © 2026

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