diff --git a/app/Providers/SearchServiceProvider.php b/app/Providers/SearchServiceProvider.php index dccd90ddec..944348218d 100644 --- a/app/Providers/SearchServiceProvider.php +++ b/app/Providers/SearchServiceProvider.php @@ -48,8 +48,8 @@ class SearchServiceProvider extends ServiceProvider { $this->app->bind( QueryParserInterface::class, - static function () { - $implementation = env('QUERY_PARSER_IMPLEMENTATION', 'default'); + static function (): GdbotsQueryParser|QueryParser { + $implementation = config('search.query_parser'); return match($implementation) { 'new' => app(QueryParser::class), diff --git a/config/search.php b/config/search.php index 304cd080a0..249fabd363 100644 --- a/config/search.php +++ b/config/search.php @@ -253,4 +253,8 @@ return [ 'destination_balance_lt' => ['alias' => false, 'needs_context' => true], 'destination_balance_is' => ['alias' => false, 'needs_context' => true], ], + /** + * Which query parser to use - 'new' or 'legacy' + */ + 'query_parser' => env('QUERY_PARSER_IMPLEMENTATION', 'legacy'), ];