laravel-scout-typesense-driver icon indicating copy to clipboard operation
laravel-scout-typesense-driver copied to clipboard

laravel-scout-typesense-driver Get config error

Open Numer0x opened this issue 1 year ago • 3 comments

Description

I'm trying to use the Scout extension in my Laravel 11 project with Typesense as the search engine, but I couldn't retrieve or access the configured settings.Perhaps this is because the validateConfigArray() function in Configuration.php directly retrieves node configuration instead of retrieving it through the correct path, resulting in Scout configuration being ignored since it actually resides under client-settings.

Steps to reproduce

image

image

image

[2024-09-26 04:44:02] local.ERROR: nodes is not defined. {"exception":"[object] (Typesense\Exceptions\ConfigError(code: 0): nodes is not defined. at /var/www/ResourceManager/vendor/typesense/typesense-php/src/Lib/Configuration.php:121) [stacktrace] #0 /var/www/ResourceManager/vendor/typesense/typesense-php/src/Lib/Configuration.php(78): Typesense\Lib\Configuration->validateConfigArray() #1 /var/www/ResourceManager/vendor/typesense/typesense-php/src/Client.php(86): Typesense\Lib\Configuration->__construct() #2 /var/www/ResourceManager/vendor/typesense/laravel-scout-typesense-driver/src/TypesenseServiceProvider.php(29): Typesense\Client->__construct()

Expected Behavior

image

When the configuration file is set up this way, it can be used normally

Metadata

Typesense Version: 27.0

OS:macos 15

Numer0x avatar Sep 26 '24 04:09 Numer0x