You are here

function apachesolr_og_enable in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 contrib/apachesolr_og/apachesolr_og.install \apachesolr_og_enable()

Implementation of hook_enable().

File

contrib/apachesolr_og/apachesolr_og.install, line 14

Code

function apachesolr_og_enable() {
  $facet_missing = variable_get('apachesolr_facet_missing', array());
  $facet_missing['apachesolr_og']['im_og_gid'] = 1;
  variable_set('apachesolr_facet_missing', $facet_missing);
  drupal_set_message(t('All existing Organic Group posts will be re-indexed'), 'warning');
  db_query("UPDATE {apachesolr_search_node} SET changed = %d WHERE nid IN (SELECT nid FROM {og_ancestry})", time());
}