I have to create a filter for an solr organic group argument so the og facet works with views.

CCK is currently supported in apachesolr_views; would this module also be a good spot to house an og arguments/filter? or should that be in a separate module?

If this module is an ok spot for it, i'll try and submit a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hatsch’s picture

did you come any further with that?

+1 for an og argument and filter

Ravi.J’s picture

The idea of providing OG integration is great, however i am not sure if that is something that needs to be part of ApacheSolr Views module, I have started a discussion on a new project proposal ApacheSolr Views Assorted Plugins

robbertnl’s picture

Status: Needs review » Active
FileSize
772 bytes

Despite of the discussion if this should be part of the module or not, I made a patch for this. The patch provides only group id arguments.
This patch also includes the bugfix as mentioned here: http://drupal.org/node/449190.

This is the wrong patch, please use patch from #5

robbertnl’s picture

Status: Active » Needs review
robbertnl’s picture

FileSize
3.94 KB

And now the corresponding patch :)

dawehner’s picture

Status: Active » Needs work

In general this works fine for me. Thanks!!

+++ apachesolr_views/apachesolr_views.views.inc	2011-03-15 09:34:40.351191994 +0100
@@ -116,9 +119,6 @@ function apachesolr_views_views_plugins(
     ),
-    'argument' => array( 	 
-      'handler' => 'apachesolr_views_handler_argument_search', 	 

This looks like a good change, see below, but a bit out of scope this patch.

+++ apachesolr_views/apachesolr_views.views.inc	2011-03-15 09:34:40.351191994 +0100
@@ -215,6 +214,7 @@ function apachesolr_views_views_data() {
     );
+  ¶

Here is some space added

+++ apachesolr_views/apachesolr_views.views.inc	2011-03-15 09:34:40.351191994 +0100
@@ -245,6 +260,9 @@ function apachesolr_views_views_data() {
+      'argument' => array(     ¶
+        'handler' => 'apachesolr_views_handler_argument_search',     ¶

some space as well, sorry

+++ apachesolr_views/handlers/apachesolr_views_handler_argument_gid.inc	2011-03-15 09:34:40.351191994 +0100
@@ -0,0 +1,19 @@
+// $Id:

this is now not needed anymore with git

In general this looks fine, if there is a rerole of the few things.

dawehner’s picture

Additional i think, that this should perhaps better belong into apachesolr_og

dawehner’s picture

FileSize
4.38 KB

Updated the patch to fix some style problems and set the group context on the argument handler like the original handler.

dawehner’s picture

FileSize
5.08 KB

The facets might shouldn't have () as part of the link.

dominikb1888’s picture

I recreated the patch form #9 against the latest dev. It also adds a few changes to adhere to coding standards.

dominikb1888’s picture

This corrects a wrong handler reference in my previous patch