You are here

function apachesolr_delete_index_form in Apache Solr Search 6

Same name and namespace in other branches
  1. 5.2 apachesolr.admin.inc \apachesolr_delete_index_form()
  2. 5 apachesolr.module \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.admin.inc
Gets information about the fields already in solr index.

File

./apachesolr.admin.inc, line 343
Administrative pages for the Apache Solr framework.

Code

function apachesolr_delete_index_form() {
  $form = array();
  $form['markup'] = array(
    '#prefix' => '<h3>',
    '#value' => t('Index controls'),
    '#suffix' => '</h3>',
  );
  $form['reindex'] = array(
    '#type' => 'submit',
    '#value' => t('Re-index all content'),
    '#submit' => array(
      'apachesolr_clear_index_submit',
    ),
  );
  $form['reindex-desc'] = array(
    '#type' => 'item',
    '#description' => t('Re-indexing will add all content to the index again (overwriting the index), but existing content in the index will remain searchable.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Delete the index'),
    '#submit' => array(
      'apachesolr_delete_index_submit',
    ),
  );
  $form['delete-desc'] = array(
    '#type' => 'item',
    '#description' => t('Deletes all of the documents in the Solr index. This is rarely necessary unless your index is corrupt or you have installed a new schema.xml.'),
  );
  return $form;
}