diff --git a/README.md b/README.md index 16a6eda..bb15b55 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ In your `config/scout.php` add: 'distance' => 2 ], 'asYouType' => false, + 'searchBoolean' => env('TNTSEARCH_BOOLEAN', false), ], ``` diff --git a/src/Engines/TNTSearchEngine.php b/src/Engines/TNTSearchEngine.php index 2507d14..2267e9a 100644 --- a/src/Engines/TNTSearchEngine.php +++ b/src/Engines/TNTSearchEngine.php @@ -143,8 +143,11 @@ protected function performSearch(Builder $builder, array $options = []) $options ); } - - return $this->tnt->search($builder->query, $limit); + if ($this->tnt->config['searchBoolean']) { + return $this->tnt->searchBoolean($builder->query, $limit); + } else { + return $this->tnt->search($builder->query, $limit); + } } /**