/**
  * Rebuilds the search index whenever a dev/build is run.
  *
  * This can be turned off by adding the following to your _config.php:
  *
  * <code>
  * ZendSearchLuceneSearchable::$reindexOnDevBuild = false;
  * </code>
  */
 public function requireDefaultRecords()
 {
     if (!self::$reindexOnDevBuild) {
         return;
     }
     ZendSearchLuceneWrapper::rebuildIndex();
     echo '<li><em>' . _t('ZendSearchLucene.RebuildSuccessMessage', 'A Lucene search index rebuild job has been added to the Jobs queue.') . '</em></li>';
     // Only run once
     self::$reindexOnDevBuild = false;
 }
 /**
  * Receives the form submission which tells the index rebuild process to 
  * begin.
  *
  * @access public
  * @return      String          The AJAX response to send to the CMS.
  */
 public function rebuildZendSearchLuceneIndex()
 {
     ZendSearchLuceneWrapper::rebuildIndex();
     FormResponse::status_message(_t('ZendSearchLucene.SuccessMessage', 'A Lucene search index rebuild job has been added to the Jobs queue.'), 'good');
     return FormResponse::respond();
 }