The package provides the perfect starting point to integrate ElasticSearch into your Laravel application.

laravel package

Features

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.

⚠️ Requirements

PHP version >= 7.1.3

Laravel Framework version >= 5.6

Elasticsearch version >= 6

Installation

Use composer to install the package:

composer require matchish/laravel-scout-elasticsearch

Set env variables

SCOUT_DRIVER=Matchish\ScoutElasticSearch\Engines\ElasticSearchEngine

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

Source Code

https://github.com/matchish/laravel-scout-elasticsearch/tree/elasticsearch-7