Search among multiple models using Laravel Scout Elasticsearch
The package provides the perfect starting point to integrate ElasticSearch into your Laravel application. It is carefully crafted to simplify the usage of ElasticSearch within the Laravel Framework.
It’s built on top of the latest release of Laravel Scout, the official Laravel search package. Using this package, you are free to take advantage of all of Laravel Scout’s great features, and at the same time leverage the complete set of ElasticSearch’s search experience.
Search amongst multiple models
Zero downtime reimport - it’s a breeze to import data in production.
Elasticsearch 7.0 ready - We don't use mapping types.
Import all searchable models at once.
A fully configurable mapping for each model.
Full power of ElasticSearch in your queries
Use composer to install the package:
composer require matchish/laravel-scout-elasticsearch
Set env variables
The package uses \ElasticSearch\Client from official package, but don't try to config it, so you 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 package. Register the provider, adding to config/app.php
'providers' => [ // Other Service Providers \Matchish\ScoutElasticSearch\ElasticSearchServiceProvider::class ],
Set ELASTICSEARCH_HOST env variable
And publish config example for elasticsearch
php artisan vendor:publish --tag config
This post is submitted by one of our members. You may submit a new post here.