You are here

function apachesolr_clear_last_index in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 apachesolr.module \apachesolr_clear_last_index()
  2. 6.2 apachesolr.module \apachesolr_clear_last_index()

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

4 calls to apachesolr_clear_last_index()
apachesolr_nodeaccess_rebuild_nodeaccess in contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
Force Solr to do a total re-index when node access rules change.
apachesolr_og_update_5000 in contrib/apachesolr_og/apachesolr_og.install
Re-index so as to use new missing field query.
apachesolr_rebuild_index_table in ./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 ./apachesolr_search.module
Implementation of hook_search().

File

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

Code

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');
  }
}