Looking to hire Laravel developers? Try LaraJobs

laravel-scout-elasticsearch maintained by lucadello91

Description
Elasticsearch Driver for Laravel Scout
Last update
2018/07/11 18:01 (dev-master)
Links
Downloads
717

Comments
comments powered by Disqus

Laravel Scout Elasticsearch Driver

Software License Packagist Version Total Downloads

This package makes is the Elasticsearch 6 driver for Laravel Scout 4.

Contents

Installation

You can install the package via composer:

composer require lucadello91/laravel-scout-elasticsearch

If you use laravel <5.5, you must add the Scout service provider and the Elasticsearch service provider in your app.php config:

// config/app.php
'providers' => [
    ...
    Laravel\Scout\ScoutServiceProvider::class,
    ScoutEngines\Elasticsearch\ElasticsearchProvider::class,
],

Setting up Elasticsearch configuration

You must have a Elasticsearch server up and running. The package automatically create the index if it not exist

If you need help with this please refer to the Elasticsearch documentation

After you've published the Laravel Scout package configuration:

// config/scout.php
// Set your driver to elasticsearch
    'driver' => env('SCOUT_DRIVER', 'elasticsearch'),

...
    'elasticsearch' => [
        'index' => env('ELASTICSEARCH_INDEX', 'laravel'),
        'hosts' => [
            env('ELASTICSEARCH_HOST', 'http://localhost'),
        ],
        'max_result_window' => '200000'
    ],
...

Usage

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

Credits

License

The MIT License (MIT).