0

I'm getting the error message:

'Driver [tntsearch] not supported'

With Laravel Scout when I issue the Artisan command php artisan scout:import "App\Location"

php artisan -V => Laravel Framework 5.4.16

Is anyone else seeing this error?

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
cawhite78
  • 91
  • 5

1 Answers1

0

You need to install TNTSearch Engine for Laravel Scout:

composer require teamtnt/laravel-scout-tntsearch-driver

Add the service provider:

// config/app.php
'providers' => [
    // ...
    TeamTNT\Scout\TNTSearchScoutServiceProvider::class,
],

Load vendor config

php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

Add SCOUT_DRIVER=tntsearch to your .env file
In your config/scout.php add:

'tntsearch' => [
    'storage'  => storage_path(), //place where the index files will be stored
    'fuzziness' => env('TNTSEARCH_FUZZINESS', false),
    'fuzzy' => [
        'prefix_length' => 2,
        'max_expansions' => 50,
        'distance' => 2
    ],
    'asYouType' => false,
],
Damian
  • 525
  • 2
  • 11
  • 24
  • Obviously taking text directly from TNT's github installation instructions isn't the answer I was looking for since I offered my laravel version. php artisan -V => Laravel Framework 5.4.16 It apperas that scout only support laravel 5.3. I'm interested if anyone has figured a work around for tnt in 5.4 – cawhite78 Apr 05 '17 at 19:37
  • It works for me in Laravel 5.4.*. Have you updated the package? – fab Jan 10 '18 at 10:49