You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed TntSearch by Scout to be able to find records by string. The problem is when i use search()->get() method on my controller and receive "message": "Undefined index: docScores" error, but when i use search()->raw() i receive the corrects matchs ids.
Trying to understand the problem, i discovered that the possible problem is on: laravel-scout-tntsearch-driver\src\Engines\TNTSearchEngine.php" inside of return $model->newCollection(collect($results['ids'])->map(function ($hit) use ($models, $results) {
if (isset($models[$hit])) {
return $models[$hit]->setAttribute('tntSearchScore', $results['docScores'][$hit]);
}
})->filter()->all());
Where the laravel dont recognize in $results['docScores'][$hit]) the 'DocScore.
The text was updated successfully, but these errors were encountered:
I installed TntSearch by Scout to be able to find records by string. The problem is when i use search()->get() method on my controller and receive "message": "Undefined index: docScores" error, but when i use search()->raw() i receive the corrects matchs ids.
Trying to understand the problem, i discovered that the possible problem is on: laravel-scout-tntsearch-driver\src\Engines\TNTSearchEngine.php" inside of return $model->newCollection(collect($results['ids'])->map(function ($hit) use ($models, $results) {
if (isset($models[$hit])) {
return $models[$hit]->setAttribute('tntSearchScore', $results['docScores'][$hit]);
}
})->filter()->all());
Where the laravel dont recognize in $results['docScores'][$hit]) the 'DocScore.
The text was updated successfully, but these errors were encountered: