Download the PHP package constantable/laravel-scout-sphinx without Composer
On this page you can find all versions of the php package constantable/laravel-scout-sphinx. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download constantable/laravel-scout-sphinx
More information about constantable/laravel-scout-sphinx
Files in constantable/laravel-scout-sphinx
Package laravel-scout-sphinx
Short Description Laravel Scout Sphinx Driver
License MIT
Informations about the package laravel-scout-sphinx
Laravel Scout Sphinx Driver
Introduction
This package is fork of constantable/laravel-scout-sphinx. package offers advanced functionality for searching and filtering data using the Sphinx full text search server for Laravel Scout.
Installation
Composer
Use the following command to install this package via Composer.
Configuration
Publish the Scout configuration using the vendor:publish
Artisan command.
This command will publish the scout.php
configuration file to your config directory, which you can than edit and set sphinxsearch
as the Scout driver.
To configure the connection to Sphinx server add the following (i.e. default) connection options.
Override these variables in your .env
file if required.
Usage
- Add the
Laravel\Scout\Searchable
trait to the model you would like to make searchable. - Customize the index name and searchable data for the model:
A basic search:
Please refer to the Scout documentation for additional information. You can run more complex queries on the index by using a callback, setting the where
clause, orderBy
, or paginate
threshold. For example:
Note: Changes on Sphinx indexes are only allowed for RT (Real-time) indexes. If you have these and need to update/delete records please define public $isRT = true;
in the model's property.
Credits
License
Licensed under the MIT license