You are here

function apachesolr_attachments_delete_index_form in Apache Solr Attachments 6.2

Same name and namespace in other branches
  1. 6 apachesolr_attachments.admin.inc \apachesolr_attachments_delete_index_form()

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

1 string reference to 'apachesolr_attachments_delete_index_form'
apachesolr_attachments_admin_page in ./apachesolr_attachments.admin.inc
@file Provides a file attachment search implementation for use with the Apache Solr module

File

./apachesolr_attachments.admin.inc, line 109
Provides a file attachment search implementation for use with the Apache Solr module

Code

function apachesolr_attachments_delete_index_form() {
  $form = array();
  $form['markup'] = array(
    '#prefix' => '<h3>',
    '#value' => t('Index and cache controls'),
    '#suffix' => '</h3>',
  );
  $form['reindex'] = array(
    '#type' => 'submit',
    '#value' => t('Re-index all files'),
    '#submit' => array(
      'apachesolr_attachments_reindex_submit',
    ),
  );
  $form['reindex-desc'] = array(
    '#type' => 'item',
    '#description' => t('Re-indexing will add all file text to the index again (overwriting the index), but existing text in the index will remain searchable.'),
  );
  $form['delete'] = array(
    '#type' => 'submit',
    '#value' => t('Delete files from index'),
    '#submit' => array(
      'apachesolr_attachments_delete_index_submit',
    ),
  );
  $form['delete-desc'] = array(
    '#type' => 'item',
    '#description' => t('Deletes all of the files in the Solr index and reindexes them.  This may be needed if you have changed the allowed file extensions,if your index is corrupt, or if you have installed a new schema.xml.'),
  );
  $form['clear-cache'] = array(
    '#type' => 'submit',
    '#value' => t('Delete cached file text'),
    '#submit' => array(
      'apachesolr_attachments_delete_cache_submit',
    ),
  );
  $form['cache-desc'] = array(
    '#type' => 'item',
    '#description' => t('Deletes the local cache of extacted text from files. This will cause slower performance when reindexing since text must be re-extracted.'),
  );
  return $form;
}