You are here

function apachesolr_get_last_index_position in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_get_last_index_position()
  2. 6.3 apachesolr.module \apachesolr_get_last_index_position()

Returns last changed and last ID for an environment and entity type.

2 calls to apachesolr_get_last_index_position()
apachesolr_drush_solr_get_last_indexed in drush/apachesolr.drush.inc
Get the last indexed document
_apachesolr_index_get_next_set_query in ./apachesolr.index.inc
Internal function that identifies entities that are still due to be indexed.

File

./apachesolr.module, line 883
Integration with the Apache Solr search application.

Code

function apachesolr_get_last_index_position($env_id, $entity_type) {
  $stored = apachesolr_environment_variable_get($env_id, 'apachesolr_index_last', array());
  return isset($stored[$entity_type]) ? $stored[$entity_type] : array(
    'last_changed' => 0,
    'last_entity_id' => 0,
  );
}