You are here

function apachesolr_index_batch_index_remaining in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.admin.inc \apachesolr_index_batch_index_remaining()
  2. 6.3 apachesolr.admin.inc \apachesolr_index_batch_index_remaining()

Submit a batch job to index the remaining, non-indexed content.

Parameters

string $env_id: The environment ID where it needs to index the remaining items for

2 calls to apachesolr_index_batch_index_remaining()
apachesolr_drush_solr_index in drush/apachesolr.drush.inc
Index all the items in the queue using a batch command
apachesolr_index_action_form_remaining_confirm_submit in ./apachesolr.admin.inc
Submit handler for the deletion form.

File

./apachesolr.admin.inc, line 1131
Administrative pages for the Apache Solr framework.

Code

function apachesolr_index_batch_index_remaining($env_id, $total_limit = null) {
  $batch = array(
    'operations' => array(
      array(
        'apachesolr_index_batch_index_entities',
        array(
          $env_id,
          $total_limit,
        ),
      ),
    ),
    'finished' => 'apachesolr_index_batch_index_finished',
    'title' => t('Indexing'),
    'init_message' => t('Preparing to submit content to Solr for indexing...'),
    'progress_message' => t('Submitting content to Solr...'),
    'error_message' => t('Solr indexing has encountered an error.'),
    'file' => drupal_get_path('module', 'apachesolr') . '/apachesolr.admin.inc',
  );
  batch_set($batch);
}