public function actionReindex()
 {
     $models = array_unique(array_merge(array_keys(SearchResultsBackend::models()), array_keys(SearchResultsFrontend::models())));
     // todo очистку индекса
     $output = '';
     foreach ($models as $class) {
         $output .= "Uploading \"{$class}\" model items.<br />";
         $completed = $this->upload($class);
         $output .= "<b>{$completed} items uploaded.</b><hr /><br />";
     }
     return $this->renderContent($output);
 }
 public function init()
 {
     parent::init();
     Index::getDb()->open();
     // проверяем коннект к elasticSearch
 }