diff -upr apachesolr/apachesolr.module hacked/apachesolr/apachesolr.module
--- apachesolr/apachesolr.module	2008-10-05 13:30:07.000000000 -0400
+++ hacked/apachesolr/apachesolr.module	2008-10-23 14:31:06.000000000 -0400
@@ -325,11 +325,12 @@ class ApacheSolrUpdate {
 
     // Get CCK fields list
     $cck_fields = apachesolr_cck_fields();
-
     $result = self::getNodesToIndex($namespace);
     $count = 0;
     $documents = array();
+    
     while ($row = db_fetch_object($result)) {
+      
       // Variables to track the last item changed.
       $solr_last_change = $row->last_change;
       $solr_last_id = $row->nid;
@@ -534,10 +535,12 @@ function apachesolr_block($op = 'list', 
         $facet_display_limits = variable_get('apachesolr_facet_query_limits', array());
         
         if ((strpos($delta, 'imfield_vid') === 0) && module_exists('taxonomy')) {
-          if (is_array($response->facets->$delta)) {
+          
+          if (is_object($response->facet_counts->facet_fields->$delta)) {
             $contains_active = FALSE;
             $terms = array();
-            foreach ($response->facets->$delta as $tid => $count) {
+            
+            foreach ($response->facet_counts->facet_fields->$delta as $tid => $count) {
               $unclick_link = '';
               unset($active);
               $term = taxonomy_get_term($tid);
@@ -606,10 +609,10 @@ function apachesolr_block($op = 'list', 
              'content' => theme('apachesolr_sort_list', $sort_links));
 
           case 'type':
-            if (is_array($response->facets->type)) {
+            if (is_object($response->facet_counts->facet_fields->type)) {
               $contains_active = FALSE;
               $types = array();
-              foreach ($response->facets->type as $t => $count) {
+              foreach ($response->facet_counts->facet_fields->type as $t => $count) {
                 $unclick_link = '';
                 unset($active);
                 $type = node_get_types('name', $t);
@@ -643,10 +646,10 @@ function apachesolr_block($op = 'list', 
             }
             break;
           case 'uid':
-            if (is_array($response->facets->uid)) {
+            if (is_object($response->facet_counts->facet_fields->uid)) {
               $contains_active = FALSE;
               $users = array();
-              foreach ($response->facets->uid as $uid => $count) {
+              foreach ($response->facet_counts->facet_fields->uid as $uid => $count) {
                 $unclick_link = '';
                 unset($active);
                 if ($uid == 0) {
diff -upr apachesolr/apachesolr_search.module hacked/apachesolr/apachesolr_search.module
--- apachesolr/apachesolr_search.module	2008-10-05 12:26:33.000000000 -0400
+++ hacked/apachesolr/apachesolr_search.module	2008-10-23 14:36:03.000000000 -0400
@@ -87,11 +87,11 @@ function apachesolr_search_search($op = 
         $page = isset($_GET['page']) ? $_GET['page'] : 0;
         $params['start'] = $page * $params['rows'];
         $response = $solr->search($query->get_query(), $params['start'], $params['rows'], $params);
-        apachesolr_has_searched(TRUE);
-        $total = $response->numFound;
         // The response is cached so that it is accessible to the blocks and anything
         // else that needs it beyond the initial search.
         apachesolr_static_response_cache($response);
+        apachesolr_has_searched(TRUE);
+        $total = $response->numFound;
         pager_query("SELECT %d", $params['rows'], 0, NULL, $total);
         if ($total > 0) {
           foreach ($response->documents as $doc) {
