bethinkpl / elastic-scout
Elastic Driver for Laravel Scout
Requires
- php: ^7.2|^8.0|^8.1
- laravel/scout: ^9.3
Requires (Dev)
- elasticsearch/elasticsearch: ^7.9
- mockery/mockery: ^1.0
- phpunit/phpunit: ^8.0|^9.3
Suggests
- elasticsearch/elasticsearch: Required to use the Elasticsearch engine (^7.9.0).
- dev-master
- 8.1.0
- 8.0.6
- 8.0.5
- 8.0.4
- 8.0.3
- v7.0.1
- v7.0.0
- 5.0.1
- 5.0.0
- 4.0.0
- 3.0.x-dev
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.x-dev
- 2.0.1
- 2.0.0
- 1.0.1.x-dev
- 1.0.1
- 1.0.0.x-dev
- 0.0.1.x-dev
- dev-IT-5205_add_make_indices_command
- dev-merge_fork
- dev-IT-5207-shouldSearchableUpsert
- dev-IT-3544-savePhrase-supports-elastic7
- dev-IT-3544_elasticsearch_bump
This package is auto-updated.
Last update: 2024-11-04 14:33:24 UTC
README
This is a fork of https://github.com/ErickTamayo/laravel-scout-elastic with a few changes:
https://github.com/ErickTamayo/laravel-scout-elastic/compare/master...bethinkpl:master
Laravel Scout Elasticsearch Driver
Archived
I haven't had the time to dedicate work to this repo and I don't plan to do so in the future.
This package provides a Elasticsearch driver for Laravel Scout.
Contents
Installation
You can install the package via composer:
composer require bethinkpl/elastic-scout
Laravel will automatically register the driver service provider.
Install elasticsearch-php client
For use this library we recomend using the latest version at this time (^7.9)
composer require elasticsearch/elasticsearch
Setting up Elasticsearch configuration
After you've published the Laravel Scout package configuration, you need to set your driver to elasticsearch
and add its configuration:
// config/scout.php ... // Set your driver to elasticsearch 'driver' => env('SCOUT_DRIVER', 'elasticsearch'), ... /* |-------------------------------------------------------------------------- | Elasticsearch Configuration |-------------------------------------------------------------------------- | | Here you may configure your Elasticsearch settings. | */ 'elasticsearch' => [ 'hosts' => [ env('ELASTICSEARCH_HOST', 'localhost'), // [ // 'host' => env('ELASTICSEARCH_HOST', 'localhost'), // 'port' => env('ELASTICSEARCH_PORT', '9200'), // 'scheme' => env('ELASTICSEARCH_SCHEME', 'https'), // 'path' => env('ELASTICSEARCH_PATH', '/elastic'), // 'user' => env('ELASTICSEARCH_USER', 'username'), // 'pass' => env('ELASTICSEARCH_PASS', 'password'), // ] ], ] ...
For host configuration you can refer to the official Elasticsearch documentation
Usage
Now you can use Laravel Scout as described in the Laravel Scout official documentation
Limitations
Identifying Users Currrently user identification is not supported.
Credits
License
The MIT License (MIT).