generated fromzingimmick/package-skeleton-laravel
Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9
Laravel Scout custom engine for OpenSearch
License
NotificationsYou must be signed in to change notification settings
zingimmick/laravel-scout-opensearch
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
RequiresPHP 8.0+
Require Laravel Scout OpenSearch usingComposer:
composer require zing/laravel-scout-opensearch
return [// ...'opensearch' => ['hosts' => [env('OPENSEARCH_HOST','localhost:9200')],'basicAuthentication' => [env('OPENSEARCH_USERNAME','admin'),env('OPENSEARCH_PASSWORD','admin')],'retries' =>env('OPENSEARCH_RETRYS',2), ],];
Set app name and table name for model
class SearchableModelextends Model{use Searchable;publicfunctionsearchableAs():string {return'searchable_models_index'; }/** * @return array{id: mixed} */publicfunctiontoSearchableArray():array {return ['id' =>$this->getScoutKey(), ]; }}
return [// ...'opensearch' => ['hosts' => [env('OPENSEARCH_HOST','localhost:9200')],'basicAuthentication' => [env('OPENSEARCH_USERNAME','admin'),env('OPENSEARCH_PASSWORD','admin')],'retries' =>env('OPENSEARCH_RETRYS',2),'sigV4Region' =>env('OPENSEARCH_REGION','us-east-1') ,'sigV4Service' =>env('OPENSEARCH_SERVICE','es') ,'sigV4CredentialProvider' => ['key' =>env('OPENSEARCH_IAM_KEY'),'secret' =>env('OPENSEARCH_IAM_SECRET'), ], ],];
return [// ...'opensearch' => ['hosts' => [env('OPENSEARCH_HOST','localhost:9200')],'basicAuthentication' => [env('OPENSEARCH_USERNAME','admin'),env('OPENSEARCH_PASSWORD','admin')],'retries' =>env('OPENSEARCH_RETRYS',2),'logger' => (new \Monolog\Logger('opensearch'))->pushHandler(new \Monolog\Handler\RotatingFileHandler('opensearch.log')),'tracer' => (new \Monolog\Logger('opensearch'))->pushHandler(new \Monolog\Handler\RotatingFileHandler('opensearch.log')), ],];
Laravel Scout OpenSearch is an open-sourced software licensed under theMIT license.
About
Laravel Scout custom engine for OpenSearch
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.