diff --git a/sites/all/modules/patched/apachesolr_views/PATCHES.txt b/sites/all/modules/patched/apachesolr_views/PATCHES.txt
new file mode 100644
index 0000000..80bffec
--- /dev/null
+++ b/sites/all/modules/patched/apachesolr_views/PATCHES.txt
@@ -0,0 +1 @@
+http://drupal.org/node/1014988
\ No newline at end of file
diff --git a/sites/all/modules/patched/apachesolr_views/apachesolr_views.views.inc b/sites/all/modules/patched/apachesolr_views/apachesolr_views.views.inc
index d55b897..f1236fe 100644
--- a/sites/all/modules/patched/apachesolr_views/apachesolr_views.views.inc
+++ b/sites/all/modules/patched/apachesolr_views/apachesolr_views.views.inc
@@ -16,6 +16,9 @@ function apachesolr_views_views_handlers() {
       'apachesolr_views_handler_argument_optionwidget' => array(
         'parent' => 'apachesolr_views_handler_argument',
       ),
+      'apachesolr_views_handler_argument_gid' => array(
+        'parent' => 'apachesolr_views_handler_argument',
+      ),
       'apachesolr_views_handler_argument_node_type' => array(
         'parent' => 'apachesolr_views_handler_argument',
       ),
@@ -116,9 +119,6 @@ function apachesolr_views_views_plugins() {
         //'help topic' => 'apachesolr-cache-time', // TODO!!!
       ),
     ),
-    'argument' => array( 	 
-      'handler' => 'apachesolr_views_handler_argument_search', 	 
-    ),
   );
 
 }
@@ -138,7 +138,6 @@ function apachesolr_views_views_data() {
       'help' => t('Searches the site with the Apache Solr search engine for @name', array('@name' => $name)),
       'field' => $base_field,
     );
-
     $data['apachesolr_' . $base_table]['nid'] = array(
       'title' => t('Nid'),
       'help' => t('The node ID of the node.'),
@@ -215,6 +214,7 @@ function apachesolr_views_views_data() {
         'handler' => 'apachesolr_views_handler_sort',
       ),
     );
+
     // TODO Get taxonomy fields to work
     if (module_exists('taxonomy')) {
       $data['apachesolr_' . $base_table]['tid'] = array(
@@ -237,6 +237,21 @@ function apachesolr_views_views_data() {
         ),
       );
     }
+    // Add OG field im_og_gid if OG installed
+    if (module_exists('apachesolr_og')) {
+      $data['apachesolr_' . $base_table]['im_og_gid'] = array(
+        'title' => t('Organic group IDs'),
+        'help' => t('The OG gids.'),
+        'argument' => array(
+          'handler' => 'apachesolr_views_handler_argument_gid',
+        ),
+        'field' => array(
+          'numeric' => TRUE,
+          'handler' => 'views_handler_field_numeric',
+          'click sortable' => FALSE,
+        ),
+      );
+    }
     // @TODO: handle language field.
   
     $data['apachesolr_' . $base_table]['text'] = array(
@@ -245,8 +260,11 @@ function apachesolr_views_views_data() {
       'filter' => array(
         'handler' => 'apachesolr_views_handler_filter_search',
       ),
+      'argument' => array(
+        'handler' => 'apachesolr_views_handler_argument_search',
+      ),
     );
-  
+
     // score field. Useful for when combining sorts. So you sort by score, creation etc.
     $data['apachesolr_' . $base_table]['score'] = array(
       'title' => t('Search Score'),
@@ -258,7 +276,7 @@ function apachesolr_views_views_data() {
         'handler' => 'apachesolr_views_handler_field_score'
       ),
     );
-  
+
     // comment_count field useful for sorting
     $data['apachesolr_' . $base_table]['comment_count'] = array(
       'title' => t('Comment Count'),
diff --git a/sites/all/modules/patched/apachesolr_views/apachesolr_views_query.inc b/sites/all/modules/patched/apachesolr_views/apachesolr_views_query.inc
index f1da41d..65a7123 100644
--- a/sites/all/modules/patched/apachesolr_views/apachesolr_views_query.inc
+++ b/sites/all/modules/patched/apachesolr_views/apachesolr_views_query.inc
@@ -669,8 +669,10 @@ class apachesolr_views_query extends views_plugin_query implements Drupal_Solr_Q
         $argument_path .= ',' . $defintion['value'];
       }
     }
-    
-    return drupal_substr($argument_path, 1);
+
+    $without_comma = drupal_substr($argument_path, 1);
+    $ret = str_replace(array('(', ')'), array(), $without_comma);
+    return $ret;
   }
   
   /**
diff --git a/sites/all/modules/patched/apachesolr_views/handlers/apachesolr_views_handler_argument_gid.inc b/sites/all/modules/patched/apachesolr_views/handlers/apachesolr_views_handler_argument_gid.inc
new file mode 100644
index 0000000..099f203
--- /dev/null
+++ b/sites/all/modules/patched/apachesolr_views/handlers/apachesolr_views_handler_argument_gid.inc
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Class that allows searching the site with Apache Solr through a view argument.
+ */
+class apachesolr_views_handler_argument_gid extends apachesolr_views_handler_argument {
+  /**
+   * Add argument to query.
+   */
+  public function query() {
+    $this->value = explode(',', $this->argument);
+    // Set context based on first node passed.
+    $node = node_load((int)$this->value[0]);
+    og_set_group_context($node);
+
+    $op = ($this->operator == 'and') ? ' AND ' : ' OR ';   
+    $filter = "(" . join($op, $this->value) . ")";
+    $this->query->add_filter($this->real_field, $filter, $this->options['not']);
+  }
+}
