Skip to content

Commit 374b65b

Browse files
authored
Merge pull request #103 from dominiquedutra/master
Option to use searchBoolean
2 parents e045d5f + b5de4fc commit 374b65b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ In your `config/scout.php` add:
7171
'distance' => 2
7272
],
7373
'asYouType' => false,
74+
'searchBoolean' => env('TNTSEARCH_BOOLEAN', false),
7475
],
7576
```
7677

src/Engines/TNTSearchEngine.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,11 @@ protected function performSearch(Builder $builder, array $options = [])
143143
$options
144144
);
145145
}
146-
147-
return $this->tnt->search($builder->query, $limit);
146+
if ($this->tnt->config['searchBoolean']) {
147+
return $this->tnt->searchBoolean($builder->query, $limit);
148+
} else {
149+
return $this->tnt->search($builder->query, $limit);
150+
}
148151
}
149152

150153
/**

0 commit comments

Comments
 (0)