We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 665de6b commit 4fddbd2Copy full SHA for 4fddbd2
src/Search.php
@@ -49,8 +49,12 @@ public function searchQuery(string $search): Builder
49
'('.$titleWeight.' * (MATCH (indexed_title) AGAINST (?)) +
50
'.$contentWeight.' * (MATCH (indexed_title, indexed_content) AGAINST (?))
51
) DESC',
52
- [$termsMatch, $termsMatch])
53
- ->limit(Config::integer('laravel-fulltext.limit-results'));
+ [$termsMatch, $termsMatch]);
+
54
+ $limit = Config::integer('laravel-fulltext.limit');
55
+ if ($limit > 0) {
56
+ $query->limit($limit);
57
+ }
58
59
if (Config::boolean('laravel-fulltext.exclude_feature_enabled')) {
60
$query->with(['indexable' => function ($query) {
0 commit comments