Closed FynnZW closed 2 years ago
The additional site search parameters are not behaving as expected. This is working correctly:
// controllers/search.php return function ($site) { $query = get('q'); $results = $site->search($query, 'text|title'); return [ 'query' => $query, 'results' => $results ]; };
However, this is not:
minlength
$results = $site->search($query, [ "fields" => ["text", "title"], "minlength" => 5, ]);
--> If the search query is shorter than the minlength, all pages get returned (instead of zero)
stopwords
$results = $site->search($query, [ "fields" => ["text", "title"], "stopwords" => ["und", "and"] ]);
--> stopwords are not being ignored, result does not change
I have not tested the other parameters.
Expected behavior minlength > query length should return zero results. stopwords should be ignored during search
Kirby Version 3.7.5
✅
The additional site search parameters are not behaving as expected. This is working correctly:
However, this is not:
minlength
--> If the search query is shorter than the
minlength
, all pages get returned (instead of zero)stopwords
--> stopwords are not being ignored, result does not change
I have not tested the other parameters.
Expected behavior
minlength
> query length should return zero results.stopwords
should be ignored during searchKirby Version
3.7.5