]> _ Git - cubist_cms-back.git/commitdiff
#2940
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 21 Aug 2019 18:54:58 +0000 (20:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 21 Aug 2019 18:54:58 +0000 (20:54 +0200)
src/app/Magic/Search.php

index 9e1893f70d340a225276fe092a6d5329c350bd1e..44f1df98aa6838e617a9b62bed1536610991e33e 100644 (file)
@@ -139,7 +139,7 @@ class Search
         ];
     }
 
-    protected function _french()
+    protected static function _french()
     {
         return [
             "filter" => [
@@ -190,6 +190,9 @@ class Search
     public static function query($term, $limit = null)
     {
         $index = config('cubist.internal_search_index');
+        if (null === $limit) {
+            $limit = 50;
+        }
 
         // Set weight of each field
         $fields = ['short_title' => 4, 'long_title' => 1, 'keywords' => 5, 'description' => 1, 'main' => 2];