function apachesolr_get_last_index_position in Apache Solr Search 8
Same name and namespace in other branches
- 6.3 apachesolr.module \apachesolr_get_last_index_position()
 - 7 apachesolr.module \apachesolr_get_last_index_position()
 
Returns last changed and last ID for an environment and entity type.
3 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_entities in ./
apachesolr.index.inc  - Processes all index queues associated with the passed environment.
 - _apachesolr_index_get_next_set_query in ./
apachesolr.index.inc  - Internal function to avoid duplicating logic that identifies entities still due to be indexed
 
File
- ./
apachesolr.module, line 888  - 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,
  );
}