diff --git a/apachesolr_og.info b/apachesolr_og.info
index a996669..a92a2b9 100644
--- a/apachesolr_og.info
+++ b/apachesolr_og.info
@@ -1,7 +1,7 @@
 name = Apache Solr Organic Groups
 description = Integrates Organic Groups and Apache Solr Search
-package = Apache Solr
-core = 7.x
+package = Search Toolkit
+core = 6.x
 
 dependencies[] = apachesolr
 dependencies[] = og
diff --git a/apachesolr_og.module b/apachesolr_og.module
index f4dd3e6..c99fcdb 100644
--- a/apachesolr_og.module
+++ b/apachesolr_og.module
@@ -5,50 +5,39 @@
  *   Integrates Organic Group info with Apache Solr search application.
  */
 
-/**
- * Implements hook_apachesolr_field_mappings_alter().
- */
-function apachesolr_og_apachesolr_field_mappings_alter(&$mappings) {
-  $mappings['group'] = array(
-    'indexing_callback' => 'apachesolr_og_group_indexing_callback',
-    'map callback' => 'apachesolr_og_map_gid_label',
-    'index_type' => 'integer',
-    'facets' => TRUE,
-    'facet missing allowed' => TRUE,
-    'dependency plugins' => array(),
-    'hierarchy callback' => FALSE,
-    'name_callback' => '',
-    'multiple' => TRUE,
-  );
-}
-
-/**
- * Index callback for OG field.
- */
-function apachesolr_og_group_indexing_callback($entity, $field_name, $index_key, $field_info) {
-  $fields = array();
-  if (!empty($entity->{$field_name})) {
-    $field = $entity->$field_name;
-    list($lang, $values) = each($field);
-    foreach ($values as $fval) {
-      if ($fval['gid']) {
-        $fields[] = array(
-          'key' => $index_key,
-          'value' => $fval['gid'],
-        );
-      }
+function apachesolr_og_apachesolr_index_document_build_node(ApacheSolrDocument $document, $node, $env_id) {
+  // Index group posts
+  if (!empty($node->og_groups)) {
+    foreach ($node->og_groups as $gid) {
+      $document->setMultiValue(apachesolr_og_gid_key(), $gid);
     }
   }
-  return $fields;
+  elseif (isset($node->og_description) && variable_get('apachesolr_og_groupnode', 0)) {
+    // Index the group node itself as in the group.
+    $document->setMultiValue(apachesolr_og_gid_key(), $node->nid);
+  }
+}
+
+function drupalorg_crosssite_facetapi_facet_info($searcher_info) {
+  $key = apachesolr_og_gid_key();
+  $facets = array();
+  $facets[$key] = array(
+    'field' => $key,
+    'label' => t('Organic Group'),
+    'description' => t('Filter by Organic Group'),
+  );
+  return $facets;
 }
 
 /**
- * Group name mapping callback.
+ * Apachesolr index name for Organic group id
  */
-function apachesolr_og_map_gid_label($gids) {
-  return db_select('og', 'og')
-           ->fields('og', array('gid', 'label'))
-           ->condition('gid', $gids, 'IN')
-           ->execute()
-           ->fetchAllKeyed();
+function apachesolr_og_gid_key() {
+  $group_id = array(
+    'name'       => 'og_gid',
+    'multiple'   => TRUE,
+    'index_type' => 'integer',
+  );
+  // Returns im_og_gid.
+  return apachesolr_index_key($group_id);
 }