Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.82
diff -u -p -r1.1.2.6.2.82 apachesolr_search.module
--- apachesolr_search.module	14 Apr 2009 00:12:18 -0000	1.1.2.6.2.82
+++ apachesolr_search.module	14 Apr 2009 21:18:51 -0000
@@ -251,14 +251,17 @@ function apachesolr_search_search($op = 
             }
           }
         }
-
+        
+        // cache the built query. Since all the built queries go through
+        // this process, all the hook_invocations will happen later
+        apachesolr_current_query($query);
+        
         // This hook allows modules to modify the query and params objects.
         apachesolr_modify_query($query, $params, 'apachesolr_search');
         if (!$query) {
           return array();
         }
-        apachesolr_current_query($query);
-
+        
         $response = $solr->search($query->get_query_basic(), $params['start'], $params['rows'], $params);
         // The response is cached so that it is accessible to the blocks and anything
         // else that needs it beyond the initial search.
