You are here

function apachesolr_drush_solr_index in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 drush/apachesolr.drush.inc \apachesolr_drush_solr_index()
  2. 6 drush/apachesolr.drush.inc \apachesolr_drush_solr_index()
  3. 6.2 drush/apachesolr.drush.inc \apachesolr_drush_solr_index()
  4. 7 drush/apachesolr.drush.inc \apachesolr_drush_solr_index()
1 string reference to 'apachesolr_drush_solr_index'
apachesolr_drush_command in drush/apachesolr.drush.inc
Implements hook_drush_command().

File

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

Code

function apachesolr_drush_solr_index() {
  module_load_include('inc', 'apachesolr', 'apachesolr.admin');
  module_load_include('inc', 'apachesolr', 'apachesolr.index');
  $env_id = drush_get_option('environment-id');
  if (empty($env_id)) {
    $env_id = apachesolr_default_environment();
  }
  $total_limit = intval(drush_get_option('limit'));
  apachesolr_index_batch_index_remaining($env_id, $total_limit);
  drush_backend_batch_process();
}