visuddhinanda 2 år sedan
förälder
incheckning
9e9a0d9715

+ 2 - 2
app/Console/Commands/UpgradeSimIndex.php

@@ -41,9 +41,9 @@ class UpgradeSimIndex extends Command
     public function handle()
     {
         SentSimIndex::where('id','>',0)->delete();
-        $result = DB::select('select count(*) from (select sent1 from sent_sims where sim>0.7  group by sent1) T');
+        $result = DB::select('select count(*) from (select sent1 from sent_sims where sim>0.5  group by sent1) T');
         $bar = $this->output->createProgressBar($result[0]->count);
-        foreach (SentSim::selectRaw('sent1,count(*)')->where('sim','>',0.7)->groupBy('sent1')->cursor() as $sent) {
+        foreach (SentSim::selectRaw('sent1,count(*)')->where('sim','>',0.5)->groupBy('sent1')->cursor() as $sent) {
             SentSimIndex::insert(
                 ['sent_id'=>$sent->sent1,
                 'count'=>$sent->count,]);

+ 1 - 1
app/Http/Controllers/SentSimController.php

@@ -28,7 +28,7 @@ class SentSimController extends Controller
                     return $this->error("no sent");
                 }
                 $table = SentSim::where('sent1',$sentId)
-                                ->where('sim',">",0.7)
+                                ->where('sim',">",0.5)
                                 ->orderBy('sim','desc');
                 break;
         }