LaravelPackages.net
Acme Inc.
Toggle sidebar
pxslip/laravel-scout-solr

A driver for the Laravel Scout search tools, using Apache Solr for the backend

4.462
19
v2.3.0
About pxslip/laravel-scout-solr

pxslip/laravel-scout-solr is a Laravel package for a driver for the laravel scout search tools, using apache solr for the backend. It currently has 19 GitHub stars and 4.462 downloads on Packagist (latest version v2.3.0). Install it with composer require pxslip/laravel-scout-solr. Discover more Laravel packages by pxslip or browse all Laravel packages to compare alternatives.

Last updated

Solr Engine for Scout

Latest Stable Version Latest Unstable Version Total Downloads

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

  • [x] Add bindings instead of just passing the string for better escaping
  • [x] Add nested querying to Builder
  • [x] Add nested querying to ScoutEngine
  • [ ] Write tests

Star History Chart