Skip to content

Commit

Permalink
Merge pull request teamtnt#103 from dominiquedutra/master
Browse files Browse the repository at this point in the history
Option to use searchBoolean
  • Loading branch information
nticaric authored Jul 9, 2017
2 parents e045d5f + b5de4fc commit 374b65b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ In your `config/scout.php` add:
'distance' => 2
],
'asYouType' => false,
'searchBoolean' => env('TNTSEARCH_BOOLEAN', false),
],
```

Expand Down
7 changes: 5 additions & 2 deletions src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

/**
Expand Down

0 comments on commit 374b65b

Please sign in to comment.