You are here

function apachesolr_nodeaccess_rebuild_nodeaccess in Apache Solr Search 5

Same name and namespace in other branches
  1. 5.2 contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module \apachesolr_nodeaccess_rebuild_nodeaccess()
  2. 6 contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module \apachesolr_nodeaccess_rebuild_nodeaccess()
  3. 6.2 contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module \apachesolr_nodeaccess_rebuild_nodeaccess()

Forces Solr to do a total re-index. This is unfortunate because not every node is going to be affected, but there is little we can do.

1 string reference to 'apachesolr_nodeaccess_rebuild_nodeaccess'
apachesolr_nodeaccess_form_alter in contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
Implementation of hook_form_alter().

File

contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module, line 113

Code

function apachesolr_nodeaccess_rebuild_nodeaccess(&$form, $form_state) {
  drupal_set_message(t('Solr search index will be rebuilt.'));
  node_access_rebuild();

  // TODO This affects EVERY node in the solr, not just ones for this site!
  ApacheSolrUpdate::reset('apachesolr');
}