PHPackages                             aschmelyun/sphinxsearch - 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. aschmelyun/sphinxsearch

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

aschmelyun/sphinxsearch
=======================

Laravel package of Sphinxsearch for Laravel ^5.4

0493PHP

Since Mar 21Pushed 4y agoCompare

[ Source](https://github.com/aschmelyun/sphinxsearch)[ Packagist](https://packagist.org/packages/aschmelyun/sphinxsearch)[ RSS](/packages/aschmelyun-sphinxsearch/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Sphinx Search for Laravel 5.4
=============================

[](#sphinx-search-for-laravel-54)

Simple Laravel 5.4 package for make queries to Sphinx Search.

Inspired by [sngrl/sphinxsearch](https://github.com/sngrl/sphinxsearch), and made it also usable in Laravel 5.4.

Installation
============

[](#installation)

Run the following command in your console to pull down the package from packagist.

```
composer require cugr/sphinxsearch:dev-master
```

After updating composer, add the ServiceProvider to the "providers" array in config/app.php:

```
	'providers' => [
        /*** Some others providers ***/
        CuGR\SphinxSearch\SphinxSearchServiceProvider::class,
    ],
```

You can add this line to the files, where you may use SphinxSearch:

```
use CuGR\SphinxSearch\SphinxSearch;
```

Configuration
=============

[](#configuration)

To use Sphinx Search, you need to configure your indexes and what model it should query. To do so, publish the configuration into your app.

```
php artisan vendor:publish --provider="CuGR\SphinxSearch\SphinxSearchServiceProvider"
```

This will create the file `config/sphinxsearch.php`. Modify as needed.

Usage
=====

[](#usage)

Basic query (raw sphinx results)

```
$sphinx = new SphinxSearch();  // or $sphinx = new SphinxSearch('connection_name');
$results = $sphinx->search('my query', 'index_name')->query();
```

Basic query (with Eloquent)

```
$results = $sphinx->search('my query', 'index_name')->get();
```

Query another Sphinx index with limit and filters.

```
$results = $sphinx->search('my query', 'index_name')
	->limit(30)
	->filter('attribute', array(1, 2))
	->range('int_attribute', 1, 10)
	->get();
```

Query with match and sort type specified.

```
$result = $sphinx->search('my query', 'index_name')
	->setFieldWeights(
		array(
			'partno'  => 10,
			'name'    => 8,
			'details' => 1
		)
	)
	->setMatchMode(\Sphinx\SphinxClient::SPH_MATCH_EXTENDED)
	->setSortMode(\Sphinx\SphinxClient::SPH_SORT_EXTENDED, "@weight DESC")
	->get(true);  //passing true causes get() to respect returned sort order
```

License
=======

[](#license)

CuGR Sphinx Search is open-sourced software licensed under the [MIT license]('LICENSE')

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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/89d40a36efd670c752d8d6e488192d9ae78b9ff49503cf6b671f46d17cb67768?d=identicon)[aschmelyun](/maintainers/aschmelyun)

---

Top Contributors

[![sngrl](https://avatars.githubusercontent.com/u/6196684?v=4)](https://github.com/sngrl "sngrl (14 commits)")[![bingbig](https://avatars.githubusercontent.com/u/8176443?v=4)](https://github.com/bingbig "bingbig (7 commits)")[![nekhbet](https://avatars.githubusercontent.com/u/2778861?v=4)](https://github.com/nekhbet "nekhbet (6 commits)")[![aschmelyun](https://avatars.githubusercontent.com/u/3395980?v=4)](https://github.com/aschmelyun "aschmelyun (2 commits)")[![jpmurray](https://avatars.githubusercontent.com/u/1550428?v=4)](https://github.com/jpmurray "jpmurray (2 commits)")

### Embed Badge

![Health badge](/badges/aschmelyun-sphinxsearch/health.svg)

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

###  Alternatives

[ruflin/elastica

Elasticsearch Client

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

PHP Client for OpenSearch

15024.3M64](/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)
