New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

bytexr/laravel-scout-opensearch

Laravel Scout OpenSearch Engine
70,680 4
Install
composer require bytexr/laravel-scout-opensearch
Latest Version:v2.2.0
Laravel:10 · 11 · 12
Older releases:8 · 9
License:MIT
Last Updated:Mar 27, 2025
Links: GitHub  ·  Packagist
Maintainer: bytexr

Laravel Scout OpenSearch

Total Downloads Latest Stable Version License

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

cloudmediasolutions/laravel-scout-opensearch

OpenSearch engine for Laravel Scout

27,867 18
zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

642,562 37
romangrinev/laravel-opensearch-engine

Custom Laravel Scout OpenSearch Engine

20,540 13
lunarphp/scout-database-engine

Laravel Scout engine to allow full searching in MySQL and PostgreSQL.

51,684 5
teamtnt/laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tnts...

2,849,716 1,135

Version History

Version Released Laravel License
v2.2.0 ^10.0|^11.0|^12.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|^9.0|^10.0|^11.0 MIT