Skip to content

Commit

Permalink
Merge pull request #347 from it4need/patch-1
Browse files Browse the repository at this point in the history
🐛 fixing #342 again
  • Loading branch information
nticaric committed Sep 15, 2022
2 parents c82479b + b5f3788 commit 3684244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ public function map(Builder $builder, $results, $model)
}

// sort models by tnt search result set
return $model->newCollection($results['ids'])->map(function ($hit, $key) use ($models, $results) {
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()->values();
})->filter()->all());
}

/**
Expand Down

0 comments on commit 3684244

Please sign in to comment.