Laravel Scout Elasticsearch: integrate ElasticSearch into our Laravel app easily
The package provides the perfect starting point to integrate ElasticSearch into your Laravel application.
Search amongst multiple models
Zero downtime reimport - it’s a breeze to import data in production.
Import all searchable models at once.
A fully configurable mapping for each model.
Full power of ElasticSearch in your queries.
PHP version >= 7.1.3
Laravel Framework version >= 5.6
Elasticsearch version >= 6
Use composer to install the package:
composer require matchish/laravel-scout-elasticsearch
Set env variables
The package uses \ElasticSearch\Client from official package, but does not try to configure it, so feel free do it in your app service provider. But if you don't want to do it right now, you can use Matchish\ElasticSearchServiceProvider from the package. Register the provider, adding to config/app.php
'providers' => [ // Other Service Providers \Matchish\ScoutElasticSearch\ElasticSearchServiceProvider::class ], Set ELASTICSEARCH_HOST env variable ELASTICSEARCH_HOST=host:port
And publish config example for elasticsearch
php artisan vendor:publish --tag config