/** * 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); } }
/** * 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."); }