bytexr/laravel-scout-opensearch
Laravel Scout OpenSearch
Introduction
Laravel Scout OpenSearch simplifies the integration of Laravel Scout with OpenSearch, offering a seamless experience. Additionally, it boasts full compatibility with AWS OpenSearch, enabling hassle-free implementation.
Installation
composer require bytexr/laravel-scout-opensearch
To make the necessary updates, navigate to config/scout.php and add the following code:
return [
...
'opensearch' => [
'host' => env('OPENSEARCH_HOST', 'https://localhost:9200'),
'access_key' => env('OPENSEARCH_ACCESS_KEY', 'admin'),
'secret_key' => env('OPENSEARCH_SECRET_KEY', 'admin'),
'options' => [
'ssl_verification' => env('OPENSEARCH_SSL_VERIFICATION', true),
// Used for AWS
'sigv4_enabled' => env('OPENSEARCH_SIGV4_ENABLED', false),
'sigv4_region' => env('OPENSEARCH_SIGV4_REGION', 'eu-west-1'),
],
],
];
Finally, ensure that all required environment variables are set in your .env file, and don't forget to set the SCOUT_DRIVER value to opensearch.
Explicit Mapping
Should you need to specifically define the mapping for your indexes, you can do so by setting the index-settings key in config/scout.php as follows:
return [
...
'opensearch' => [
...
'index-settings' => [
Post::class => [
'mappings' => [
'properties' => [
'id' => [
'type' => 'text',
],
'title' => [
'type' => 'text',
],
],
],
],
],
]
]
License
Laravel Scout OpenSearch is open-sourced software licensed under the MIT license.
Related Packages
Scout-style full-text search for Webman, Laravel, ThinkPHP, and Hyperf (Eloquent...
包含中文分词的 Laravel Scout TNTSearch 驱动,支持 scws, phpanalysis 和 jieba 分...
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| v2.2.0 | ^10.0| | MIT | |
| v2.1.0 | ^11.0 | MIT | |
| v2.0.1 | ^11.0 | MIT | |
| v2.0.0 | ^11.0 | MIT | |
| 1.2.0 | ^8.0| | MIT | |
| v1.1.0 | ^8.0| | MIT | |
| v1.0.17 | ^8.0| | MIT | |
| v1.0.16 | ^8.0| | MIT | |
| v1.0.15 | ^8.0| | MIT | |
| v1.0.14 | ^8.0| | MIT | |
| v1.0.13 | ^8.0| | MIT | |
| v1.0.12 | ^8.0| | MIT | |
| v1.0.11 | ^8.0| | MIT | |
| v1.0.10 | ^8.0| | MIT | |
| v1.0.9 | ^8.0| | MIT | |
| v1.0.8 | ^8.0| | MIT | |
| v1.0.7 | ^8.0| | MIT | |
| v1.0.6 | ^8.0| | MIT | |
| v1.0.5 | ^8.0| | MIT | |
| v1.0.4 | ^8.0| | MIT | |
| v1.0.3 | ^8.0| | MIT | |
| v1.0.2 | ^8.0| | MIT | |
| v1.0.1 | ^8.0| | MIT | |
| v1.0.0 | ^8.0| |