From 25bc3d6b71fc71f1aa2bbbb5a9eae81f92bafe06 Mon Sep 17 00:00:00 2001 From: it4need Date: Fri, 29 Jul 2022 17:23:30 +0200 Subject: [PATCH] :sparkles: introducing ability to get score outside of TntSearch to make it possibile to reorder result after multiple searches (see: https://github.com/teamtnt/tntsearch/issues/55) --- src/TNTSearch.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TNTSearch.php b/src/TNTSearch.php index fabc66e..e11058d 100644 --- a/src/TNTSearch.php +++ b/src/TNTSearch.php @@ -139,6 +139,7 @@ public function search($phrase, $numOfResults = 100) return [ 'ids' => array_keys($docs->toArray()), 'hits' => $totalHits, + 'docScores' => $docScores, 'execution_time' => round($stopTimer - $startTimer, 7) * 1000 ." ms" ]; }