예제 #1
0
파일: Upgrade.php 프로젝트: elodex/elodex
 /**
  * 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);
     }
 }
예제 #2
0
파일: OpenIndex.php 프로젝트: elodex/elodex
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $indexName = $this->option('index') ?: $this->indexManager->getDefaultIndex();
     $this->indexManager->openIndex($indexName);
     $this->info("Index '{$indexName}' successfully opened.");
 }