在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ErickTamayo/laravel-scout-elastic开源软件地址(OpenSource Url):https://github.com/ErickTamayo/laravel-scout-elastic开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Laravel Scout Elasticsearch DriverThis package provides a Elasticsearch driver for Laravel Scout. ContentsInstallationYou can install the package via composer: composer require tamayo/laravel-scout-elastic Laravel will automatically register the driver service provider. Install elasticsearch-php clientFor use this library we recomend using the latest version at this time composer require elasticsearch/elasticsearch Setting up Elasticsearch configurationAfter you've published the Laravel Scout package configuration, you need to set your driver to // 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 UsageNow you can use Laravel Scout as described in the Laravel Scout official documentation LimitationsIdentifying Users Currrently user identification is not supported. CreditsLicenseThe MIT License (MIT). |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论