diff --git a/src/Search.php b/src/Search.php index 7927307..a57a1fb 100644 --- a/src/Search.php +++ b/src/Search.php @@ -32,13 +32,11 @@ public function runForClass($search, $class) */ public function searchQuery($search) { - $termsBool = ''; $termsMatch = ''; if ($search) { $terms = TermBuilder::terms($search); - $termsBool = '+'.$terms->implode(' +'); $termsMatch = ''.$terms->implode(' '); } @@ -46,7 +44,7 @@ public function searchQuery($search) $contentWeight = str_replace(',', '.', (float)config('laravel-fulltext.weight.content', 1.0)); $query = IndexedRecord::query() - ->whereRaw('MATCH (indexed_title, indexed_content) AGAINST (? IN BOOLEAN MODE)', [$termsBool]) + ->whereRaw('MATCH (indexed_title, indexed_content) AGAINST (?)', [$termsMatch]) ->orderByRaw( '(' .$titleWeight. ' * (MATCH (indexed_title) AGAINST (?)) + ' . $contentWeight. ' * (MATCH (indexed_title, indexed_content) AGAINST (?))