/**
  * DOCUMENT ME
  * @param mixed $arguments
  * @param mixed $options
  */
 protected function execute($arguments = array(), $options = array())
 {
     // initialize the database connection
     $databaseManager = new sfDatabaseManager($this->configuration);
     $connection = $databaseManager->getDatabase($options['connection'] ? $options['connection'] : null)->getConnection();
     // PDO connection not so useful, get the doctrine one
     $conn = Doctrine_Manager::connection();
     $context = sfContext::createInstance($this->configuration);
     if (isset($options['table'])) {
         $indexes = array($options['table']);
     } else {
         $indexes = sfConfig::get('app_aToolkit_indexes', array());
     }
     $count = 0;
     foreach ($indexes as $index) {
         $table = Doctrine::getTable($index);
         if ($options['verbose']) {
             echo "Optimizing {$index}\n";
         }
         aZendSearch::optimizeLuceneIndex($table);
     }
     if ($options['verbose']) {
         echo "Success!\n";
     }
 }
 /**
  * DOCUMENT ME
  * @return mixed
  */
 public function optimizeLuceneIndex()
 {
     return aZendSearch::optimizeLuceneIndex($this);
 }