You are here

function apachesolr_drush_solr_get_last_indexed in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 drush/apachesolr.drush.inc \apachesolr_drush_solr_get_last_indexed()
  2. 7 drush/apachesolr.drush.inc \apachesolr_drush_solr_get_last_indexed()

Get the last indexed document

Parameters

string $env_id:

string $entity_type:

1 string reference to 'apachesolr_drush_solr_get_last_indexed'
apachesolr_drush_command in drush/apachesolr.drush.inc
Implements hook_drush_command().

File

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

Code

function apachesolr_drush_solr_get_last_indexed($env_id = NULL, $entity_type = 'node') {
  if (NULL === $env_id) {
    $env_id = apachesolr_default_environment();
  }
  $return = apachesolr_get_last_index_position($env_id, $entity_type);
  drush_print($return['last_entity_id']);
}