Exemplo n.º 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $indexName = $this->option('index') ?: '_all';
     $wait = $this->option('wait') ? true : false;
     $dump = $this->option('dump') ? true : false;
     $this->indexManager->closeIndex($indexName);
     $results = $this->indexManager->upgrade($indexName, $wait);
     $this->indexManager->openIndex($indexName);
     if ($dump) {
         (new Dumper())->dump($results);
     } else {
         $this->printResults($results);
     }
 }
Exemplo n.º 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $indexName = $this->option('index') ?: $this->indexManager->getDefaultIndex();
     $this->indexManager->closeIndex($indexName);
     $this->info("Index '{$indexName}' successfully closed.");
 }