You are here

function apachesolr_drush_solr_index in Apache Solr Search 6

Same name and namespace in other branches
  1. 8 drush/apachesolr.drush.inc \apachesolr_drush_solr_index()
  2. 6.3 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
Implementation of hook_drush_command().

File

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

Code

function apachesolr_drush_solr_index() {
  $cron_limit = variable_get('apachesolr_cron_limit', 50);
  $rows = apachesolr_get_nodes_to_index('apachesolr_search', $cron_limit);
  apachesolr_index_nodes($rows, 'apachesolr_search');
  $count = count($rows);
  drush_print("{$count} nodes were sent to Solr.");
}