teamtnt / laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch
MIT License
1.09k stars 142 forks source link

Error While Indexing #329

Closed blpraveen closed 1 month ago

blpraveen commented 3 years ago

I am getting this error when indexing Can you tell how to solve this?

D:\laragon_new\www\oneCart>php artisan scout:import "App\Product"

   ErrorException  : Trying to access array offset on value of type bool

  at D:\laragon_new\www\oneCart\vendor\teamtnt\tntsearch\src\TNTSearch.php:398
    394|     {
    395|         $query = "SELECT * FROM info WHERE key = '$value'";
    396|         $docs  = $this->index->query($query);
    397|
  > 398|         return $docs->fetch(PDO::FETCH_ASSOC)['value'];
    399|     }
    400|
    401|     public function filesystemMapIdsToPaths($docs)
    402|     {

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Trying to access array offset on value of type bool", "D:\laragon_new\www\oneCart\vendor\teamtnt\tntsearch\src\TNTSearch.php", ["stemmer", "SELECT * FROM info WHERE key = 'stemmer'", Object(PDOStatement)])
      D:\laragon_new\www\oneCart\vendor\teamtnt\tntsearch\src\TNTSearch.php:398

  2   TeamTNT\TNTSearch\TNTSearch::getValueFromInfoTable("stemmer")
      D:\laragon_new\www\oneCart\vendor\teamtnt\tntsearch\src\TNTSearch.php:377

Please use the argument -v to see more details.