Solr Driver for Laravel Scout

v0.1.2-alpha 2018-10-10 12:09 UTC

This package is auto-updated.

Last update: 2020-03-10 15:53:35 UTC



Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads Laravel Scout Apache Solr PHP


You can read the documentation here.

Problems, questions or comments?

If you have any problems, questions or comments, feel free to submit an issue and I will reply to you as soon as possible.


Install Laravel Scout.


Install via Composer

$ composer require jeroenherczeg/laravel-scout-solr

Set your SCOUT_DRIVER to solr:

// .env



You must add the Scout service provider and the Solr engine service provider in your app.php config:

// config/app.php

'providers' => [
         * Package Service Providers...

Add the Solr configuration to the scout config file:

// config/scout.php


    | Solr Configuration
    | Here you may configure your Solr settings. Solr is the popular, blazing
    | -fast, open source enterprise search platform built on Apache Lucene.
    | If necessary, you can override the configuration in your .env file.

    'solr' => [
        'host' => env('SOLR_HOST', ''),
        'port' => env('SOLR_PORT', '8983'),
        'path' => env('SOLR_PATH', '/solr/'),
        'core' => env('SOLR_CORE', 'scout'),


Now you can use Laravel Scout as described in the official documentation

Using Solr with Laravel Homestead

You can install Solr within your Homestead virtual machine.

Add the port forwarding to your Homestead.yaml

// ~/Homestead/Homestead.yaml


    - send: 18983
      to: 8983

Add the following install steps to your Homestead script.

// ~/Homestead/


# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
# If you have user-specific configurations you would like
# to apply, you may also create,
# which will be run after this script.

# Install Java Runtime Enviroment
sudo apt-get update
sudo apt-get install default-jre -y

# Install Solr 7.5
tar zxf solr-7.5.0.tgz
cd solr-7.5.0
bin/solr create -c scout
bin/solr start

You will need to recreate your the virtual machine.

vagrant destroy && vagrant up

Once the virtual machine is installed and running, you can access Solr admin on .

Change log

Please see CHANGELOG for more information on what has changed recently.


$ composer test


Please see CONTRIBUTING and CODE_OF_CONDUCT for details.


If you discover any security related issues, please email instead of using the issue tracker.



The MIT License (MIT). Please see License File for more information.