Преглед изворни кода

Merge branch 'laravel' of https://github.com/visuddhinanda/mint into laravel

visuddhinanda пре 2 година
родитељ
комит
068f80cd41
1 измењених фајлова са 13 додато и 3 уклоњено
  1. 13 3
      app/Console/Commands/TestSearchPali.php

+ 13 - 3
app/Console/Commands/TestSearchPali.php

@@ -42,14 +42,24 @@ class TestSearchPali extends Command
         if(empty($word)){
         if(empty($word)){
             $word = 'citta';
             $word = 'citta';
         }
         }
-        $result = PaliSearch::search([$word],[],'case',0,3);
+        $words = str_replace('_',' ',$word);
+        $words = explode(',',$word);
+        $this->info("searching word={$word} limit=10,offset=0");
+        $result = PaliSearch::search($words,[],'case',0,10);
         if($result){
         if($result){
             $this->info("word={$word} total=".$result['total']);
             $this->info("word={$word} total=".$result['total']);
         }else{
         }else{
             $this->error("word={$word} search fail");
             $this->error("word={$word} search fail");
         }
         }
-
-        $result = PaliSearch::search([$word],[267],'case',0,3);
+        $this->info("searching word={$word} limit=10,offset=10");
+        $result = PaliSearch::search($words,[],'case',10,10);
+        if($result){
+            $this->info("word={$word} total=".$result['total']);
+        }else{
+            $this->error("word={$word} search fail");
+        }
+        $this->info("searching word={$word} book=267");
+        $result = PaliSearch::search($words,[267],'case',0,3);
         if($result){
         if($result){
             $this->info("word={$word} book=267 total=".$result['total']);
             $this->info("word={$word} book=267 total=".$result['total']);
         }else{
         }else{