You are here

function apachesolr_drush_solr_get_next_indexed in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 drush/apachesolr.drush.inc \apachesolr_drush_solr_get_next_indexed()
  2. 7 drush/apachesolr.drush.inc \apachesolr_drush_solr_get_next_indexed()
1 string reference to 'apachesolr_drush_solr_get_next_indexed'
apachesolr_drush_command in drush/apachesolr.drush.inc
Implements hook_drush_command().

File

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

Code

function apachesolr_drush_solr_get_next_indexed($env_id = NULL, $entity_type = 'node') {
  module_load_include('inc', 'apachesolr', 'apachesolr.index');
  if (NULL === $env_id) {
    $env_id = apachesolr_default_environment();
  }
  $return = apachesolr_index_get_entities_to_index($env_id, $entity_type, 1);
  $output = isset($return[0]->entity_id) ? $return[0]->entity_id : '0';
  drush_print($output);
}