From 0ac49539ba4d9de01e8beea2e33e9516e22c8551 Mon Sep 17 00:00:00 2001 From: pushrbx Date: Thu, 13 Jul 2023 20:37:22 +0100 Subject: [PATCH] made text match bucketing configurable --- app/Services/TypeSenseScoutSearchService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/TypeSenseScoutSearchService.php b/app/Services/TypeSenseScoutSearchService.php index c8f0066..f7bfca5 100644 --- a/app/Services/TypeSenseScoutSearchService.php +++ b/app/Services/TypeSenseScoutSearchService.php @@ -141,7 +141,7 @@ class TypeSenseScoutSearchService implements ScoutSearchService // override ordering field if (!is_null($orderByField) && in_array($orderByField, $modelAttrNames)) { - $options['sort_by'] = "$orderByField:" . ($sortDirectionDescending ? "desc" : "asc") . ",_text_match(buckets:".$this->maxItemsPerPage."):desc"; + $options['sort_by'] = "$orderByField:" . ($sortDirectionDescending ? "desc" : "asc") . ",_text_match(buckets:".$this->jikanConfig->textMatchBuckets()."):desc"; } // override overall sorting direction