lucadello91 / laravel-scout-elasticsearch
Elasticsearch Driver for Laravel Scout
Installs: 717
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
pkg:composer/lucadello91/laravel-scout-elasticsearch
Requires
- php: ^7.0
- elasticsearch/elasticsearch: ^6.0
- laravel/scout: ^4.0
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~5.0
Suggests
- elasticsearch/elasticsearch: Required to use the Elasticsearch engine (^6.0).
This package is auto-updated.
Last update: 2020-01-18 16:13:20 UTC
README
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).