From 9401b677a316e8719c8c0cd90e486c70f2009f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Thu, 10 Nov 2022 12:57:46 +0100 Subject: [PATCH] change weighing for exact words match --- src/Api/Controllers/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Controllers/SearchController.php b/src/Api/Controllers/SearchController.php index 0239378..bd3fda9 100644 --- a/src/Api/Controllers/SearchController.php +++ b/src/Api/Controllers/SearchController.php @@ -267,7 +267,7 @@ class SearchController extends ListDiscussionsController $query = (new MatchQuery('content', $q)) ->operator($operator); - $boost = $operator === 'and' ? 1 : .8; + $boost = $operator === 'and' ? 1.8 : .8; return $this->boolQuery($query, $boost); }