pxslip / laravel-scout-solr
A driver for the Laravel Scout search tools, using Apache Solr for the backend
v2.3.0
2024-06-07 18:31 UTC
Requires
- php: ^7.1
- illuminate/support: >=5.5
- laravel/scout: >=5.0
- solarium/solarium: ^4.2
Requires (Dev)
- squizlabs/php_codesniffer: ^3.2
- vimeo/psalm: ^3.1
This package is auto-updated.
Last update: 2026-05-18 19:32:47 UTC
README
This engine provides the interface between Laravel Scout and a Solr instance.
Installation
composer require pxslip/laravel-scout-solr
For Laravel <= 5.4 the service provider should be registered in config/app.php
'providers' => [ // ...other providers Scout\Solr\ScoutSolrServiceProvider::class, ]
Usage
As the engine uses some functionality that is not fully compatible with Laravel\Scout\Builder and Laravel\Scout\Searchable you will need to use the Scout\Solr\Builder and Scout\Solr\Searchable versions instead:
use Scout\Solr\Searchable; class MyModel extends Model { use Searchable; ... } // and then to perform a search MyModel::where(...) ->orWhere(...) ->facetField(...)
TO DO
- Add bindings instead of just passing the string for better escaping
- Add nested querying to Builder
- Add nested querying to ScoutEngine
- Write tests