You are here

function apachesolr_delete_index_form in Apache Solr Search 5

Same name and namespace in other branches
  1. 5.2 apachesolr.admin.inc \apachesolr_delete_index_form()
  2. 6 apachesolr.admin.inc \apachesolr_delete_index_form()

Create a form for deleting the contents of the Solr index.

1 string reference to 'apachesolr_delete_index_form'
apachesolr_index_page in ./apachesolr.module

File

./apachesolr.module, line 201
Integration with the Apache Solr search application.

Code

function apachesolr_delete_index_form() {
  $form = array();
  $form['markup'] = array(
    '#type' => 'markup',
    '#value' => '<h3>Solr Index</h3>',
  );
  $form['delete_index'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete all documents'),
    '#description' => t('This option deletes all of the documents in the Solr index. You would do this if the index contains wrong content that you need to purge. This action shouldn\'t be necessary in normal cases. After deleting you will need to rebuild the index by running cron.'),
    '#default_value' => NULL,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Delete the index'),
  );
  return $form;
}