Example #1
0
 /**
  * Runs the indexer
  *
  * @param   bool    tells the indexer to push/fork the task
  * @return  string  returns the output of the index command
  */
 public function run_index($push = FALSE)
 {
     if ($this->index_config instanceof Sphinx_Conf) {
         $this->mk_index();
     }
     return Sphinx::index($this->index_config->index, $push);
 }
Example #2
0
 public function action_run($cmd = null)
 {
     echo '<pre>';
     if ($cmd == 'start') {
         echo Sphinx::start();
     } elseif ($cmd == 'restart') {
         echo Sphinx::restart();
     } elseif ($cmd == 'stop') {
         echo Sphinx::stop();
     } elseif ($cmd == 'index') {
         echo Sphinx::index();
     }
     echo '</pre>';
 }