apachesolr_clear_last_index

Versions
5 – 6
apachesolr_clear_last_index($namespace = '')

Clear a specific namespace's last changed and nid, or clear all.

▾ 4 functions call apachesolr_clear_last_index()

apachesolr_nodeaccess_rebuild_nodeaccess in contributions/apachesolr/contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
Force Solr to do a total re-index when node access rules change.
apachesolr_og_update_6000 in contributions/apachesolr/contrib/apachesolr_og/apachesolr_og.install
Re-index so as to use new missing field query.
apachesolr_rebuild_index_table in contributions/apachesolr/apachesolr.module
Truncate and rebuild the apachesolr_search_node table, reset the apachesolr_index_last variable. This is the most complete way to force reindexing, or to build the indexing table for the first time.
apachesolr_search_search in contributions/apachesolr/apachesolr_search.module
Implementation of hook_search().

Code

contributions/apachesolr/apachesolr.module, line 236

<?php
function apachesolr_clear_last_index($namespace = '') {
  if ($namespace) {
    $stored = variable_get('apachesolr_index_last', array());
    unset($stored[$namespace]);
    variable_set('apachesolr_index_last', $stored);
  }
  else {
    variable_del('apachesolr_index_last');
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.