change weighing for exact words match

This commit is contained in:
Daniël Klabbers 2022-11-10 12:57:46 +01:00
parent 4bc89949ec
commit 9401b677a3
1 changed files with 1 additions and 1 deletions

View File

@ -267,7 +267,7 @@ class SearchController extends ListDiscussionsController
$query = (new MatchQuery('content', $q)) $query = (new MatchQuery('content', $q))
->operator($operator); ->operator($operator);
$boost = $operator === 'and' ? 1 : .8; $boost = $operator === 'and' ? 1.8 : .8;
return $this->boolQuery($query, $boost); return $this->boolQuery($query, $boost);
} }