You are here

function apachesolr_og_enable in Apache Solr Search 6

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

Implementation of hook_enable().

File

contrib/apachesolr_og/apachesolr_og.install, line 19
Install and related hooks for the apachesolr_date module.

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