You are here

function apachesolr_drush_solr_delete_index in Apache Solr Search 6

Same name and namespace in other branches
  1. 8 drush/apachesolr.drush.inc \apachesolr_drush_solr_delete_index()
  2. 5.2 apachesolr.drush.inc \apachesolr_drush_solr_delete_index()
  3. 6.3 drush/apachesolr.drush.inc \apachesolr_drush_solr_delete_index()
  4. 6.2 drush/apachesolr.drush.inc \apachesolr_drush_solr_delete_index()
  5. 7 drush/apachesolr.drush.inc \apachesolr_drush_solr_delete_index()

Example drush command callback.

This is where the action takes place.

In this function, all of Drupals API is (usually) available, including any functions you have added in your own modules/themes.

To print something to the terminal window, use drush_print().

1 string reference to 'apachesolr_drush_solr_delete_index'
apachesolr_drush_command in drush/apachesolr.drush.inc
Implementation of hook_drush_command().

File

drush/apachesolr.drush.inc, line 97
drush integration for apachesolr.

Code

function apachesolr_drush_solr_delete_index() {
  $args = func_get_args();
  module_load_include('inc', 'apachesolr', 'apachesolr.admin');
  if (count($args) > 0) {
    foreach ($args as $type) {
      apachesolr_delete_index($type);
    }
  }
  else {
    apachesolr_delete_index();
  }
}